Highcharts column width with variable x axis point spacing - highcharts

So I have an x axis of type datetime, and a series of type column:
http://jsfiddle.net/drmrbrewer/215tnLna/3/
Now, in reality, the spacing of points on the x axis may not always be uniform as in the above example. For example, let's drop a couple of the points to create a non-uniform spacing:
http://jsfiddle.net/drmrbrewer/215tnLna/4/
What I'd like to happen is for each column to fill the entire span from the relevant point to the previous point, so that the gaps would be entirely filled in the above example.
Is that possible? Hopefully without some horrible hack? From a quick search it seems that there is a suggestion that different series may be required (one for each column width). I'm hoping that isn't the case because (a) it's complicated; and (b) I don't know in advance what spacings I'm going to encounter in the data, so it's even more complicated!
Thanks!

What you are trying to make is a histogram, not a bar chart (even bar/column widths). Perhaps you need to use the histogram chart type? https://www.highcharts.com/docs/chart-and-series-types/histogram-series

Related

Coreplot Y axis cut off / no numbers?

I am having issues with my implementation of CorePlot. I have a subview in my UIViewController than contains the chart. Most of the data shows up fine but no increments / values are showing up on the y axis.
This is what I am seeing now:
If I shift the x axis start point by subtracting 10 (to better see the left half of the chart) I see this:
For the record, I do not have any values outside of the (positive x, positive y) quadrant on the chart and have logged out my data to verify this. Any input / advice would be appreciated, thank you!
http://www.raywenderlich.com/13271/how-to-draw-graphs-with-core-plot-part-2
This guy does a great job explaining that about halfway down... search for "You're Getting There!" to find exactly where he talks about the weird lines in the Y axis.
Hope this helps!
Set the leftPadding on the graph.plotAreaFrame to leave room for the axis labels at the left side of the graph.
The smeared y-axis is caused by too many tick marks and labels—they overlap and become illegible and negatively impact drawing performance. You need to adjust the labeling parameters to reduce the number of ticks and labels. By default, the axis draws major tick marks and labels one unit apart. The properties that need to be changed depend on the labeling policy you want to use.

how to center highcharts at the middle

I have two axis in highcharts and I dont specify the range for either. Please see graph.
For some reason, series one from 201 to 206 is taking up the whole chart while series 2 which is only -2k to 2k is being squeezed to the bottom, thereby extending the range all the way to 30k which is totally unnecessary. I think highcharts by nature wants to not have any overlap but I want that. What I'd like is for the right series to be centered, in fact I want the right axis to be centered at 0 always and can grow unrestricted in either direction. I can't hardcode any of these since I have no idea what the values could be. So Series 1 on the left is ok, but I want the value 0 for series 2 to always start at the middle of the chart. Any way to achieve that?
Try to set alignTicks as false.

How to swap the X and Y axis of a graph in Excel 2010

Transposing the table does not help. Every time I get this graph:
I tried to swap the axes in the Select Data Source dialogue but then I get this:
Now the letters (they are departments in real world, I just simplified it) are on the vertical axis, but the horizontal axis is wrong. Of course the graph is also wrong as I don't need two vertical axes. I need the columns to be horizontal as that graph would be much easier to read.
Is this possible?
You have to choose another type of graph. Try the 'bar'-type. (You can change it by right-click -> Change type).

Highcharts :: Need to split y-axis from primary body of chart. Can I display this axis separately from the Highchart?

I have a situation where I need to remove all margins from a highchart and remove the x/y axis so it fills a series of columns in a table completely.
I did that, no problem. Chart goes to the extremes as needed.
What I need now is that pesky yaxis I already removed...but displayed in a table cell outside of the existing highcharts object.
It would seem easy, as though I could just set the overflow property of yaxis to 'visible' and play with the offset...which would work however this would only work if I wanted to re-position the axis within the boundaries of the highchart object. I want him in a different cell entirely.
Is there anyone who has had experience in this situation? Is it going to require me to have a secondary highchart with only a y-axis?
Best answer gets a green check.
EDIT :: I now have dispersed each 'day' into their own column (more bars coming per day [scheduled,actual,etc...]). In order to keep the scales lined up, I manipulate the yAxis:max property and set them all to a derived value.
In the open column (currently w/ text Hourly Trends) is where I would put an additional highchart module with no series data but with the same min/max/tickInterval.
The next big leap will be to see the data is alive and changes w/ schedule. May have to start another thread for that one, no?
Create a new HC object with no data but only the yAxis (making sure it is the right scale, etc). Perhaps add the same series of data to it but hide the series? Add it to the location you want. This seems kludge and not very good practice. Each business use is different but why would you want this?
EDIT based on comment of business rules:
Why not come at this from a different direction and have the individual chart elements (the bars/points/etc) be a single point chart. This way you have one chart per column. You can then set up the yAxis to be text and not worry about the position. If we could see an example of the page layout and the desired result that would help.

Coreplot: Axis Labels Fixed Location

I'm trying to customize a Coreplot graph in many ways I can and the next thing I would like to do is place the X Axis Labels (one that is custom as well) at the bottom of the graph, independent of the X axis' position (whether it's scrolled up or down).
To make it clear, it is similar to giving the labels an offset value of something like 50.0. But offset is not the property I'm looking for since it fixes the labels location relative to the X axis.
Any way this can be done? Or do I have to skip the axisLabels property and place and layer or something manually at the bottom of the graph?
EDIT: Alright, I managed to place an axis on the bottom with CPTConstraints. But it's not on the bottommost. If a plot point is on those levels, the plot line overlaps the labels. I tired padding of the graph but of course, it moves the whole graph, hence the issue persists.
Thanks in advance
Make a second x-axis. Have the first one draw the axis line, tick marks, etc., as normal but no labels. Label the second one and set all of the line style properties to nil so it doesn't draw any of the lines.
Turns out that aside from the graph, the plotAreaFrame property of the CPTGrpah also has paddings. If you give more paddings to plotAreaFrame than that of the graph, the plot will be drawn in a smaller frame and the rest of the graph area will be for you to add what you want (i.e., a second Axis).
Big thanks to #Eric, for trying to answer Every single CorePlot question as soon as possible.
CorePlot does have a lot of customisation than I thought.

Resources