score:15
You can achieve the desired result by redefining labels.formatter on axis. jsFiddle is here.
But if you want to keep it simple and pass axis.categories
in traditional way (I think that this is a way more better), I suggest you to use a tiny hack and redefine an Axis.init
function. Try it on jsFiddle.
UPD: I've updated my previous fiddle a little. Check it out. I think that you can combine all my solution to get a nicer one.
score:0
You need the following settings.
xAxis: {
plotLines: [{
value: 0,
color: '#color'
}],
tickmarkPlacement: 'on'
},
yAxis: {
lineWidth: 0,
}
score:2
Just add:
...
xAxis: {
startOnTick: true,
...
},
...
score:3
A cleaner solution is to use the pointPlacement
reference provided in the Highchart API.
Add pointPlacement: 'on'
and you should be in business. (For reference, here is their example JSFiddle)
score:3
xAxis: {
categories: ['cat1', 'cat2', 'cat3', 'cat4', 'cat5']
},
series: [
{
name: 'name of series',
data: [0, 2, 0, 2, 0],
pointPlacement: 'on',
}
]
This solution worked for me, maybe it helps. I can't confirm whether or not this applies to other ways of inputting data.
score:4
You can use spacingLeft and spacingRight to set the spacing:
chart: {
renderTo: 'chart1',
type: 'area',
spacingLeft: -21,
spacingRight: -21,
spacingBottom: 1
},
Source: stackoverflow.com
Related Query
- How to get Highcharts X-Axis Categories starting at the left most point
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- How do I get the value of a highcharts graph point on mouseover?
- How to get the highlighted point from shared tooltip formatter, Highcharts
- Highcharts Bubble Chart - How to get the size of the point
- Highcharts - How can I get the nearest point on click event
- Highcharts - how to access category of multiple axis of the point from tooltip
- Highcharts: How to move the column bar to the left most side when there is only one point in drilldown
- How to get the axis value with respect to the cross hair in highcharts
- How to plot the X axis data point for uneven tick interval at in Highcharts
- HighCharts - Angular, how to get y axis labels on the vertical lines drawn from x axis
- How to get highcharts dates in the x axis?
- how to set the interval of points on Y - Axis highcharts
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- How can I get the max value of a y axis at highcharts?
- how to get chart object inside a point event function in Highcharts
- Highchart - line or area not starting at the left point
- Highcharts How to get decimal point values on y-axis with big numbers
- Get name of clicked point in Highcharts when the point has drilldown
- How to get next point in Highcharts tooltip
- How to get the Div id of charts in highcharts on click of it in angular 6
- How to add point to the beginning of series, Highcharts
- how to get the axis value when I click on a cursor in highstock(high charts)?
- HighCharts - Show categories in x axis intead of the value of x in Bubble Chart
- How do I get my highcharts to reduce in size when the window is resized down
- How do I put Icons in the y Axis for a Dynamic Highcharts chart?
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Highcharts - how to create multiple y axis and group the data series
- how to display 2 same highcharts without duplicate the code
- Highcharts Boxplots How to get five point summary?
More Query from same tag
- Format number data with comma and unit in Highchart
- highcharts pie using javascript array
- highchart dynamic binding using asp.net
- Highcharts - Different Marker for Each Point of Area Plot
- Live HighChart not displaying data
- Highcharts plugin: show/hide tooltips on click
- How to show multiple pie charts using highcharts
- HighCharts not showing anything
- How do I adapt to slow-loading highcharts in EmberJS?
- how to add items to an array dynamically in javascript
- set the background color for column group graphs in highcharts
- highcharts x-axis irregular date intervals issue
- Add Categories to Highcharts via Loop
- Remove Default Title from Chart (HighChart)
- Highchart stacked area series is not showing correctly
- how to map serial and data points using json Array
- highcharts drilldown not working
- Highcharts (highstock) anyway to detect maximum value in a series
- Is it possible to use null datapoints with a datetime x-axis?
- jquery calling highcharts generating error 17
- highcharts - disable fading series on marker hover
- Hide or Disable Legend or Label in the end Highcharts line
- Highcharts bargraph from json data in angularJS
- How to have different cursor style for legends in Highcharts?
- Starting Time Series Highcharts Plot at specific date/time
- highcharts: individual serie shift
- How to add data labels for highchart?
- Odd animation with multiple series
- Conditions within highcharts code
- How could I change the x,y label and remove empty x bar