score:-2
You need to change the tickmarkPlacement option to 'on'.
xAxis:[{
categories:categories,
title:{text:null},
gridLineWidth: 1,
verticalAlign:'top',
lineWidth:0,
offset:-400,
minPadding:0,
maxPadding:0,
margin:[0,0,0,0],
tickmarkPlacement:'on'
}],
score:4
Have a look at How to get Highcharts X-Axis Categories starting at the left most point.
In few words - when you set xAxis.Categories, xAxis becomes 'string' instead of 'numeric'. So all ticks settings (startOnTick, endOnTick...) don't work with it. Good trick is to override xAxis.labels formatter:
var xCategories = ['1990','1991','1992','1993','1994','1995','1996','1997','1998'];
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
},
xAxis: {
labels: {
formatter: function() {
return xCategories[this.value];
}
},
startOnTick: false,
endOnTick: false,
minPadding: 0,
maxPadding: 0,
gridLineWidth: 1
},
series: [{
data: [2000,9001,1337,100,1000,4444,8888,1844,6780]
}]
});
See example: http://jsfiddle.net/vnJLG/
Source: stackoverflow.com
Related Query
- Highchart - line or area not starting at the left point
- HighChart - Stacked Bar chart - To show dash line over the bar chart but it is not visible on Left side of the bar
- How to get Highcharts X-Axis Categories starting at the left most point
- Highchart Area Range chart with gradient that follows the line
- Highchart : Add data padding for left stepped area last point
- When adding point on dynamically created Multiple Highchart Graphs on a single page, the plot line draws to the start point instead of last point?
- Highcharts ( stockchart series line is not connecting to the last point
- Highchart xAxis tick not starting at first data point
- Highchart point is not right in its line
- HighChart 'tooltip' object is not found on the very next line in IE8
- Highchart Combination Chart Area Range not displaying on chart but line chart works
- Highchart : Line Chart not Loading the data from Database on screen
- highstock. Can I add one line of tooltip when the point is in the area of plotbands?
- When adding a point to a series, the marker does not display (It's hidden by other area splines)
- highchart : add point without changing the series' line
- Make Highcharts tooltip show info for closest point to the left (i.e. not change at midpoint)
- Highcharts => Getting the id of a point when clicking on a line chart
- Highcharts area fillOpacity do not work when changing the color
- highchart chart redraw method is not refreshing the chart
- Creating 0-50-100 percentile area line graphs that use 50 as the threshold for negative
- Highcharts change the line color if its out of the area range
- Highchart how to animate from the xaxis bottom line upward
- Highchart showing indicator at last point for line chart
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- Highchart not displaying the pie chart with Ajax data
- html button not firing event to the required graph container firing to different graph in Highchart JS
- Highstock shared tooltip multiple series - show data for line when not on point
- How to make two charts using highchart show up in the same line side by side using div
- Remove line dots from the area spline chart
- continue the line drawing on dotnet highchart
More Query from same tag
- Adding series markers to highcharts area chart
- Drill Down Maps In R + Shiny
- realign Labels only to single Chart or type chart on highcharts
- Highcharts show plot value on x axis label
- HighCharts Angular - data from API not showing in chart
- highchatrs arabic translation is not working perfectly
- Add clickable link to tooltip in Highcharts Scatter Plot
- Highcharts update series type dataloss
- Display informations under the X-Axis like in Excel with Highcharts
- Grouped bar chart for the following data?
- Highcharts position dataLabels on hide/show event
- syncing Highcharts horizontally that range in number of y-axis titles and also no y-axis titles
- Highcharts bar graph doesn't show yaxis values
- Handdrawn Lines for Highcharts
- Angular Highcharts-ng how to set additional data series as tooltip
- High charts date getting changed to random years
- Link inside of a Highcharts tooltip
- Highcharts renderer.rect on xAxis label not responsive
- Highcharts adding array of variable to series
- How to assign .POST return value to a variable
- Reduce gap between series data in Bar Highchart
- Highcharts dont display statistics with MySQL Query
- higcharts highstock issue with flag position
- Remove Zero From the HIGHCHART
- Getting Highcharts tooltip to return an angular directive using templeteUrl?
- Highcharts - How to export graphic server side?
- updating the array that is being passed to highcharts in meteor app
- Highcharts x axis date full range even if there is not enough data
- How to show horizontal line instead of a dot for a single value data in highcharts
- Programmatically zoom out with highcharts-ng