score:1
Accepted answer
Set x value for the point. By default x values for the scatter are integers - 0, 1, 2 so they are centered according to the category. You can move them a little by 0.15 and then in the pointFormatter round those values.
series: [{
name: '2015',
data: [7, 8, 9]
}, {
name: '2015 Goal',
marker: {
symbol: 'circle'
},
data: [
[-0.15, 5],
[1 - 0.15, 6],
[2 - 0.15, 6]
],
type: 'scatter'
}, {
name: '2016',
data: [9, 9, 10]
}, {
name: '2016 Goal',
marker: {
symbol: 'circle'
},
data: [
[0.15, 10],
[1 + 0.15, 12],
[2 + 0.15, 13]
],
type: 'scatter'
}]
In pointFormatter:
plotOptions: {
scatter: {
tooltip: {
pointFormatter: function() {
return `x: <b>${Math.round(this.x)}</b><br/>y: <b>${this.y}</b><br/>`
}
}
}
},
example: http://jsfiddle.net/kh8b4jy3/
Source: stackoverflow.com
Related Query
- How to add markers to a grouped bar plot in Highcharts?
- How to add a label above each bar in HighCharts
- How to add a horizontal line in Column bar chart in Highcharts plugin?
- How do i add mouse wheel code in Angular2 highcharts in typescript
- How to add an extra label on a scatter plot point in Highcharts Javascript library?
- How to add vertical (and horizontal) line in highcharts scatter plot
- How to make split grouped column bar chart in highcharts with percentage?
- How to add custom icons as markers in Highcharts
- How to add box shaders to plot Highcharts
- Add a line on each bar for stacked and grouped column in HighCharts
- Highcharts how to add an extra value to a bar
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- How to plot stacked bar chart in highcharts with dynamic data?
- How to dynamically add grouped _categories in Highcharts in MVC
- How would I add a padding to the plot area in HighCharts (HighStock) to pad the border?
- How to add series to an empty chart without breaking the plot border in highcharts
- Highcharts - How to add background in bar series? And how to print page without lose quality?
- How do I rotate my HighCharts bar chart so its vertical, not horizontal?
- how to add copyright symbol in a highcharts title?
- How do I add an event listener to a Highcharts object *AFTER* I've created it
- How to hyperlink bar graph in highcharts
- How to convert datetime string to UTC to plot points on Highcharts
- How to convert datetime string to UTC to plot points on Highcharts
- How to add a plotline to a bar chart in Highcharts?
- Add a gap between the second and third series in a Highcharts column plot with four series displayed
- How to know information about the clicked bar in highchart column r shiny plot
- How to add image in Highcharts Title and subtitle
- How to add Highcharts on UIWebView in iOS?
- how to add annotation text to a Highcharts chart?
- How to add space between chart and axis in highcharts
More Query from same tag
- how to get a dynamically created graph in highchart using json data
- Set min and max value in double for y-axis in highchart
- Highchart stacked column tooltip issue
- How to display error message in Highcharts?
- highstock shows wrong dates in selectorRange buttons
- Why my label are not at the same height
- dynamic highchart series based on click
- How to set tooltip border color from series in Highcharts
- Is there a way to disable the Title and Subtitle in Highcharts?
- Dynamically high chart rendering not working
- Highcharts area chart with lazy_chart ruby gem
- Highcharts.js : get specific value from data to tooltip
- Show Indicator at last point on Highchart spline chart
- Modify data through chart manipulation
- Load JSON file into highcharts to draw a Line Chart
- xAxis labels refuse to align with columns
- Highcharts dynamicly update legend with grouped values
- Need to make each bar as series in highcharts
- HighCharts: How to aligned horizontal yAxis title
- HIghcharts & Bootstrap: Chart on Tab 2 is not appearing. Though First chart is working fine
- Highcharts / Highstock Invalid Date Issue
- scrollbar is not initially visible in highstock
- Use images in Highcharts as xAxis labels
- Which web charting libraries export well with Wicked PDF?
- How can I convince Highcharts to display the right (mine) steps on yaxis?
- Highcharts Column w/ drilldown not working in Rails 4
- Polymer dom-repeat not reflecting changes in array
- Highcharts Y axis horizontal title
- Correct approach to apply HTML style in x-axis title
- Chrome Dev Editor Using Bower and Highcharts Shim