How to get rid of the default x axis scale value in Highcharts - highcharts

I am populating x axis scale using an array with some nil values in it. Highcharts sets the nil values to their index value on the scale. I want to get rid of these default numbers on the x axis. Anybody knows how to do it?

Related

iOS Charts - Equidistant Y Values?

For the iOS Charts library, does anybody know how to make the y axis values equidistant from one another? So in the following picture the "1" line would be halfway up the graph?
Set axisMinimum to zero will result in your desired output.
//chartView is the object of BarChartView class.
let yAxisLeft : YAxis = self.chartView.leftAxis
yAxisLeft.axisMinimum = 0
It will remain consistent for other values too.

Highchart - Chart type, gap in the x and y axis (0,0)

Please refer the fiddle codehttp://jsfiddle.net/yuvarajkumarg/az290eyq/1/
In Highchart of type Chart, when we plot for height = 0 and pressure = 2, we get a gap as shown in jsfiddle. I want point to be plotted on the X-axis(2,0). But the graph looks like it is plotted on (2,2) since the y-axis plot starts way above the x-axis. How to remove the gap ?
The issue is the categorized axis.
There are probably a few ways around the issue, but I would do it this way (on your xAxis):
tickmarkPlacement: 'on',
min:0.5,
max:6.5
Example:
http://jsfiddle.net/az290eyq/2/
You could also do it by not using categories, and using the axis label formatter in order to display the numeric sequence that you need.
[[ edit for comments:
For the min and max values - the x axis values for a categorized axis are the category array index values. So the first category is x = 0, the second is x = 1, etc.
Because Highcharts puts the the label in the center of the value's space, setting the min/max to the actual min/max value +/- 0.5 will align the center of the space with the start/end of the axis.
So, you can calculate this dynamically by using 0.5 for the min, and counting the categories array and using (count -1.5) as the max.
Additionally, setting the tickmarkPlacement proerty to 'on' moves the tick mark to the center of the space as well, aligning the ticks with the start/end of the axis as well.

how to set the interval of points on Y - Axis highcharts

I am using highcharts for the first time, and I am trying to figure out how to set the Y axis points static.I would like to know how to set y-axis values as -0.0000000001,0.00000000,0.0000000001 and so on in Highcharts.
I have used min=-0.0000000005 and max=0.0000000005 , and the points on y axis come up as 0,0.0000,0.0000... Wherein I want it as -0.0000000001,0.00000000,0.0000000001
You can use label formatter and Highcharts numberFormat then return correct values.

Missing gridlines for spline with single repeating value

I'm plotting a spline for a generated series. When the series contains the same repeating value (x axis Datetime increasing, Y axis same int value), the gridlines disappear and the only way I can see the value is to hover over the point.
Note: The min and max are not explicitly set, as they are determined by the data at run-time.
Is there a way to force the grid to appear? I'm guessing the min and max are getting set to the value on the chart, so is there someway for it to show min as val - offset and max as val + offset at runtime perhaps?

linear Dataseries Say 0 on Y Axis Having Issue

Linear Dataseries Say all y axis is 0, Autoscaling on y axis is not working as desired.
High stock version - 1.3.1
DataSeries to be plotted,
[[1149724800000,0],[1149811200000,0],[1150070400000,0],[1150156800000,0],[1150243200000,0],[1150329600000,0],[1150416000000,0],[1150675200000,0],[1150761600000,0],[1150848000000,0],[1150934400000,0],[1151020800000,0],[1151280000000,0],[1151366400000,0],[1151452800000,0],[1151539200000,0],[1151625600000,0]]
OR
[[1149724800000,20],[1149811200000,20],[1150070400000,20],[1150156800000,20],[1150243200000,20],[1150329600000,20],[1150416000000,20],[1150675200000,20],[1150761600000,20],[1150848000000,20],[1150934400000,20],[1151020800000,20],[1151280000000,20],[1151366400000,20],[1151452800000,20],[1151539200000,20],[1151625600000,20]]
Try Above series with Y min set to 0 and Y Min to Auto.
I had the same issue with 0 values displayed in the center.
The only way I found to get round it was to either use tickPositions and pass range values across to it for the data based of min/max values and ones in between or to use the tickPositioner call back function to return to go through the data and return the tick values based on these.
Still fairly new to highcharts so there is probably another way I don't know of. If anyone knows how to have 0 values displayed at the bottom of the chart while it auto-scales then please post as I would love to know how/if its possible.
Edit: turns out this isn't really possible currently, only way to get around it is to set min/max values and that won't allow auto scaling but at least it stop there from being any middle 0 values.

Resources