I noticed that min/max values that are fed to a custom tickPositioner function are not the same as min/max values of the data set. For example, my max value when chart is downloaded as CSV is 353116.2853, but max value provided to the tickPositioner is 390819.334993875.
Similarly, min value in the dataset is -400944.7087, but tickPositioner receives
-438647.758392375.
Is this a bug?
Related
I fetch data from server as two columns, date as xAxis, and decimal number as yAxis. I need to create HTML5 chart in iReport/Jasper studio (for example stacked column chart type) using those columns (easy part) and then I need to create one line on yAxis that will represent average value of second (decimal) column for whole dataset.
Something like this
I tried to create two variables "sum" and "count" with reset type "report" and create measure as division of those two values to get average data set for whole report. Chart is not considering that value as constant while rendering yAxis points. For example, if I have 25 rows in dataset, for each point on graph it will decrease value of "sum" variable for 1....so "sum" will have values, 25, 24, 23,....,1 while line is rendered on chart.
Tried with StackedColumnLine chart type, but same results.
Anybody knows how to do this?
I am using Highcharts with datetime type xAxis and irregular timestamped data.
Is there any possibility to enforce range on the axis? Currently, even if I set min and max, based on data bounds, Highchart tends to determine x axis range based on some internal algorithm, showing i.e. more than 6 weeks, even if data is limited to one month only. This effects in "blank margins".
I am having data values which I am showing in high chart. But there neither negative value nor decimal value in my data , but than also my y-axis values have decimal value and start value of chart is -50 which need to be 500.
Kindly suggest how can i correct this issue , thanks in advance.
Set min and max for yAxis. Then to prevent decimals set allowDecimals to false.
Refs:
http://api.highcharts.com/highcharts#yAxis.allowDecimals
http://api.highcharts.com/highcharts#yAxis.min
http://api.highcharts.com/highcharts#yAxis.max
I am populating a High Charts Stock chart. This chart shows both the data points on the y-axis as well as a zoom in/out view at bottom. The data points display fine.
My problem is with the x-axis: I cannot get the years in the x-axis or the zoom to correspond with the years in the data points, that is, 1831 - 2014; instead, the zoom feature and the x-axis only go up to the 1990s (as opposed to this year.)
I think the problem lies in how the pointinterval is calculated
pointInterval: 24 * 3600 * 1000000 // one day
Here is a fiddle:
http://jsfiddle.net/8HLCF/
Thanks for reading.
Highstock options reference for pointInterval:
pointInterval: Number
If no x values are given for the points in a series, pointInterval defines the interval of the x values in milliseconds. For example, if a series contains one value each day, set pointInterval to 24 * 3600 * 1000.
You have defined x values. There is no need to use pointInterval. And additionaly your comment is wrong, you defined 1000 days instead of 1 day.
Default buttons for rangeSelector are not much useful for your data. I defined new range selector for 1y, 5y and All.
And it seems that data format is wrong. I change years to returns primitive value of Date object. See MDN docs for Date
Updated jsfiddle example
Just a simple answer needed, is there a simple way to compare a series on values rather than percentages? Something like "compare : 'values'" rather than "compare : 'percent'" or do I manually have to add data points for given time intervals? Thanks!
Yes, but the option is called value
From the plotOptions.series.compare documentation:
compare: String
Compare the values of the series against
the first value in the visible range. The y axis will show percentage
or absolute change depending on whether compare is set to "percent" or
"value". When this is applied to multiple series, it allows comparing
the development of the series against eachother. Defaults to
undefined.
The demos from the documentation: Setting compare to percent, value.