score:0
i think your problem is the automatic adjustment of the datetime labels. highcharts will take the date of a point and set the axis label according to its own logic.
for example if your axis spans several years it may display aug 2012 or even just the year. so what you see as assigning the date 01.aug 2012 to the axis in reality highcharts is displaying a date representation that it finds suitable for the axis scale.
you can control this behavior by setting the datetimelabelformat for your xaxis:
datetimelabelformats : object for a datetime axis, the scale will automatically adjust to the appropriate unit. this member gives the default string representations used for each unit. for an overview of the replacement codes, see dateformat. defaults to:
so all you have to do is change this:
{
second: '%h:%m:%s',
minute: '%h:%m',
hour: '%h:%m',
day: '%e. %b',
week: '%e. %b',
month: '%b \'%y',
year: '%y'
}
to something like
{
second: '%h:%m:%s',
minute: '%h:%m',
hour: '%h:%m',
day: '%e. %b',
week: '%e. %b',
month: '%e. %b',
year: '%e. %b %y'
}
to get it to display:
%e: day of the month, 1 through 31. and %b: short month, like 'jan'.
so for example it will display 23. jan for your point for an axis scale of day or above and 23. jan 2012 for a scale over a year.
another method would be to force the chart to display your values. i don't think that is advisable in a datetime line chart but here is an example: jsfiddle
and here the stackoverflow question with a bit more detail
score:1
it's hard to tell if this is the exact issue that you're having without seeing the screenshots, but if your problem is what i think it is, here is the solution:
try setting minpadding
and maxpadding
to 0 for the relevant axis along with startontick: true
and endontick: true
. supposedly the behavior of startontick
and endontick
gets overridden if you don't also set the padding.
Source: stackoverflow.com
Related Query
- How can I force ticks/grid lines on a Highcharts datetime X axis to arbitrarily line up with data points?
- How can I force multiple y-axis in Highcharts to have a common zero
- How can I force highcharts to show every x-axis label regardless of spacing constraints?
- How to adjust the spacing of grid lines in highcharts
- How to show only specific x-axis values on datetime axis in Highcharts
- How can i force Highcharts to use same symbols in Legend and Series?
- How do you show grid lines for both x axis and y axis in highchart?
- How To Show All Data Labels For Datetime Axis In Highcharts
- Highcharts - Cross browser charts have different Y axis ranges, how can I ensure consistency?
- Highcharts - how can I center labels on a datetime x-axis?
- Highcharts - How to force line chart to be visible above X Axis
- How can I make milestone lines with a GANTT chart using the highcharts library?
- How can I make Highcharts label a datetime X-axis with relative dates?
- How can I update the data in highcharts for both x axis & y axis?
- How can I set the units on multiple axis on Highcharts
- How to get height of axis column's ticks in highcharts
- Can you remove specific grid lines and point labels using highcharts without css?
- Can I enable scrollbar for datetime x axis in Highcharts columnrange chart
- How can I align the scale on my HighCharts graph with the axis rather than the margins?
- How can I force Highcharts to respect yAxis.max?
- How I can stick together the lines on the Highcharts timeline chart?
- HighCharts - Angular, how to get y axis labels on the vertical lines drawn from x axis
- How to remove Highcharts grid end lines on x and y axis?
- How to properly configure DateTime axis for Highcharts on Android?
- how can I use rangeselector and navigation in highcharts in the given code
- How to remove tick lines from secondary y axis in highcharts heatmap graph
- How can I show daily grid lines in HighStock? Currently seems buggy
- How can I convert datetime from Flask to Highcharts
- How to show equally spaced axis for datetime for billing cycle related data on highcharts
- How can I get access to a Highcharts chart through a DOM-Container?
More Query from same tag
- Which javascript graphs / chart library?
- High Chart to Image
- Wrong data display when i set multiple series type in highstock chart
- Loading Javascript Highcharts series data issues
- Highcharts not rendering small dataset
- How to set HighCharts dataGroup to a range/timeframe?
- How to add texts to a graph in Highcharts
- How do I Fix a bad character that appears when i zoom on highstock
- Highcharts x-axis not formatting right when showing only 1 datapoint
- I can't make Highcharts phantomJs export server work
- Highcharts - legend titles rotation is not working fine in IE10
- How can I add customized y axis in highchart basic bar?
- How to set R Highcharter stock x-axis dates
- Highchart contextmenu export black screen when stylemode
- How can you add flags to points on a graph
- Show tooltips of piechart when hover outside of the chart on a button
- Unable to set the Selected state in Highcharts, when point marker is disabled
- Angular-chart.js graph highlight
- VueJS + HighChartJS : Synchronization of columns data with chart
- combining an area chart with a line chart in highcharts.js
- Disable week view in more then 3 months x axis (Highchart js)
- Highcharts Pie Slice Offset on Legend Click
- Dynamically add an event to Highcharts series
- Highchart renders differently for height on first click
- Hightcharts - Not showing column datalabels when chart type is column
- How can I join 2 or more mapData in my highmaps?
- Change data hover line color in Highcharts
- Highcharts - setting the yAxis title dynamically
- change background color for highchart candlestick plot
- Highcharts - Specific color zones for HighCharts navigator