score:1
Unlike HighCharts, I don't think HighStock support the xAxis.categories
config.
However, you could specify the dates directly in serie.data
like this:
{
name: 'John',
data: [
[new Date(2014, 5, 11).getTime(), 5],
[new Date(2014, 5, 12).getTime(), 3],
[new Date(2014, 5, 13).getTime(), 4],
...
]
}
And the dates must be in ascending order, otherwise the chart will be broken.
Another thing is you might want to set this to make columns align with date labels correctly.
plotOptions: {
column: {
...
dataGrouping: {
enabled: true,
forced: true,
units: [
['day', [1]]
]
}
}
},
Example JSFiddle: http://jsfiddle.net/1xLny72q/2/
Hope this helps.
score:1
When we make Highstock graph by series then we can't pass x-axis seprated data as per like Highchart like in your code
xAxis: {
categories: [new Date(2014, 5, 30).getTime()/1000,new Date(2014, 5, 29).getTime()/1000,new Date(2014, 5, 28).getTime()/1000,new Date(2014, 5, 27).getTime()/1000,new Date(2014, 5, 26).getTime()/1000,new Date(2014, 5, 25).getTime()/1000,new Date(2014, 5, 24).getTime()/1000,new Date(2014, 5, 23).getTime()/1000,new Date(2014, 5, 22).getTime()/1000,new Date(2014, 5, 21).getTime()/1000,new Date(2014, 5, 20).getTime()/1000,new Date(2014, 5, 19).getTime()/1000,new Date(2014, 5, 18).getTime()/1000,new Date(2014, 5, 17).getTime()/1000,new Date(2014, 5, 16).getTime()/1000,new Date(2014, 5, 15).getTime()/1000,new Date(2014, 5, 14).getTime()/1000,new Date(2014, 5, 13).getTime()/1000,new Date(2014, 5, 12).getTime()/1000,new Date(2014, 5, 11).getTime()/1000 ]
},
its not work in HighStock
for this you need to pass these each separate value on each series like below
{
name: 'John',
data: [
[new Date(2014, 5, 11).getTime(), 5],
[new Date(2014, 5, 12).getTime(), 3],
...
]
},name: 'Jane',
data: [
[new Date(2014, 5, 11).getTime(), 2],
[new Date(2014, 5, 12).getTime(), 3],
...
])
}, {
name: 'Joe',
data: [
[new Date(2014, 5, 11).getTime(), 5],
[new Date(2014, 5, 12).getTime(), 4],
...
]}
and as per @ranTarm dates must be in ascending order and dataGrouping as mention in his comment
Source: stackoverflow.com
Related Query
- How to show time values in stacked column using High stock
- How to make stacked column graph to show total data value on top
- High chart - Column Range Chart with Time range. How to get tooltip as Start and End time
- How to show Legends for all the series data in stacked column chart Highcharts?
- How to display total of extra data in stacked column high charts
- How to show grid-lines when chart data is empty, in High Stock charts?
- how can we draw column chart with stacked column chart in a single high chart?
- How to show time duration on y-axis in high chart
- show one series data at a time in high chart column graph
- How to drilldown a stacked column highchart to show all stacks instead of clicked
- How to plot a Stacked column chart using highcharts?
- Stacked Bar Highcharts how to show the values
- How to show correctly ticks to time data in a Pie chart label using highcharts?
- High charts – how to show axis as time
- Highcharts/Highstock How to show original OHLC values in tooltip for chart drawn using adjusted OHLC values?
- How to use trellis chart with stacked column in Angular 10 using Highcharts
- How to update series values of bar with time interval in High chart?
- How to create navigation column chart in stacked column high chart
- How to create a column range chart in Highcharts using range and navigator functions?
- How to show only integer values on yAxis of HighChart?
- How to hide zero values in Column chart
- How to show a column with the value Zero in Column chart in Highcharts?
- How to show all values at datetime axis in highcharts?
- Show specific series values in the stack label using highcharts
- Hide 0 values in Stacked Column Chart in Highcharts
- How to show only specific x-axis values on datetime axis in Highcharts
- How to set values in JavaScript (Highcharts) using PHP
- Highcharts stacked column how to use different label on each category
- Highcharts stacked column stackLabels do not show when axis is reversed
- High chart date time conversion showing wrong values
More Query from same tag
- Adjust X Scale in highchart to display proper ratio
- HighStock/HighCharts DataGrouping
- Highcharts: How to add HTML inside of chart area
- Population pyramid for different regions in Highcharts
- HighCharts: How to change style of bottom most x-axis grid line
- X axis tick not centering on column series in highcharts (jsFiddle)
- xAxis label is not visible properly in Highcharts
- r- how to display the labels on the highcharter objects all the time
- Pie Charts with advanced design
- Find pixel position of point in highstock chart
- How to create pie chart with only 1 series data and have background be a circle
- How to plot line per category in highcharts?
- iOS Swift Highcharts Pie with Gradient Fill is black
- Is there a way to change the display value in series using highcharts
- Plotting a scatterplot/bubbleChart along with Columnrange graph in highcharts
- HighCharts: Resize markers of scatter chart dynamically
- Getting data from Mysql for highstock area graph.
- How to call a JS function every 10 sec which then activates a function in angular
- How do I remove the pale line between events in a Highcharts columnrange chart?
- Highchart Persist bar widh for null data
- How to adjust the height and width of background color in Highchart
- highcharts shows exception "c is undefined" for pie chart
- Can I add my own property in 'this' of xAxis labels formatter function in High Charts?
- How to color series legend in highcharts when colorbypoint is set to true
- Hide first yAxis label in Highcharts
- What is the best jQuery Chart framework to build stacked multiple y-axis charts?
- Dynamically feeding the column based highcharts from json assosiative array in jquery?
- 3D Column chart not working with sliders in asp .net project
- Highmaps mappies with drilldown
- How to make highcharts display date in hh:mm:ss format, not as timestamp?