Using Highstock percentage to compare the data, if the first data value is zero, the chart is not displayed correctly.
You can see a example here: http://jsfiddle.net/danieltamiosso/USDjC/
series: [{name: 'test', data: [0, 1, 2]}]
Any idea?
In case when you have first values as 0, mathematically is has always 0 value, because compared next value is compared with previous.
Related
Is there a way to create an empty point for the dates which are not included in the data?
Tried to use pointInterval: 24*3600*1000, but doesn't have any result.
In this example we have a gap between 31th July and 7th August which I would like to fill with empty points.
http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/stock/demo/candlestick/
You need to set ordinal: false as an option on the xAxis. Like this:
xAxis: {
ordinal: false
}
API on xAxis.ordinal: https://api.highcharts.com/highstock/xAxis.ordinal
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data for nights or weekends will not take up space in the chart.
Defaults to true.
Working example: http://jsfiddle.net/phLz68r9/
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 have a column range chart with a set of text category labels - I am trying to figure out how I can determine the maximum number of categories and values to display without Highcharts automatically hiding some category labels because there is not enough room to display them. In other words, I don't want to see a chart with 40 values but only 32 category labels visible. How can I get the actual number of displayed labels programmatically so I can reduce my data set to that number of values?
You can use tickPositions on the Axis you want:
xAxis: {
tickPositions: [0, 1, 2, 4, 8, ...]
}
This will tell the chart which points to show as labels: http://jsfiddle.net/cfad2vvL/
There is also tickPositioner which takes a function and you can do whatever you want with the labels.
We have a chart with two datetime series to display stock development over past years.
First series is a line chart with a data item for each month.
Second series is a column chart with a data item for every year.
I've put together an example: http://jsfiddle.net/kaiw/8E9nJ.
...
xAxis: [{
type: "datetime"
}]
...
We would now like to place the lables on the x-Axis between the ticks, like you can do for a category axis.
We have to work with datetime values and can't use categories because of the different number of data items per series.
Is there any other way how we can place the label between ticks?
According to documentantion tickmark is avaiable only for categorized axis. You can use x parameter for labels and set hardcoded value like in the example: http://jsfiddle.net/8E9nJ/3/
xAxis: [{
id: "xAxis",
type: "datetime",
title: null,
labels:{
x:40
}
}],
I am trying to make a chart using Highcharts which shows no of days in the x-axis if the chart is for a week or month.
Now i want to split the x-axis by "hours" if the chart is for single day.
See the fiddle here
var checkin_failures_stats = {
xAxis: {
type: 'datetime'
},
You need to use tickPositioner and calculate your ticks dynamically.
http://api.highcharts.com/highcharts#xAxis.tickPositioner
It sounds like you just need to look at the tickInterval property:
http://api.highcharts.com/highcharts#xAxis.tickInterval
You'll need to know the time span of your chart - you can either specify this directly, or you can get the min and max values from the getExtremes function, and calculate the length of the time of the chart, and set your tickInterval accordingly.
http://api.highcharts.com/highcharts#Axis.getExtremes