有人可以让我知道如何实现这一目标.以下是高图选择项: var chart1 = new Highcharts.Chart({ chart: { renderTo: 'Div1', width: 600, height: 400 }, yAxis:{ min: 0, max: 140, lineColor: '#FF0000', lineWidth: 1, title: { text: 'Values' }, plotLines: [{ value: 0, width: 10, color: '#808080' }] }, series: [{ name: 'Value', data: YaxisValuesArray }] });}); 解决方案您可以设置tickInterval(轴上的http://api.highcharts.com/highstock#yAxis.tickInterval ) http://jsfiddle.net/blaird/KdHME/ $(function () { var chart1 = new Highcharts.Chart({ chart: { renderTo: 'Div1', width: 600, height: 400 }, credits: { enabled: false }, title: { text: 'Productivity Report', x: -20 //center }, xAxis: { lineColor: '#FF0000', categories: [1, 2, 3] }, yAxis: { min: 0, max: 140, tickInterval: 20, lineColor: '#FF0000', lineWidth: 1, title: { text: 'Values' }, plotLines: [{ value: 0, width: 10, color: '#808080' }] }, tooltip: { valueSuffix: '' }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 0 }, series: [{ name: 'Value', data: [ [1, 10], [2, 20], [3, 30] ] }] });});I am using highcharts for the first time, and I am trying to figure out how to set the Y axis points static.I have used min=0 and max=140 , and the points on y axis come up as 0,25,50,75,100,125 and 150. Wherein I want it as 0,20,40,60,80,100,140.Can someone let me know how could I achieve this.Below is the highchart optins : var chart1 = new Highcharts.Chart({ chart: { renderTo: 'Div1', width: 600, height: 400 }, yAxis:{ min: 0, max: 140, lineColor: '#FF0000', lineWidth: 1, title: { text: 'Values' }, plotLines: [{ value: 0, width: 10, color: '#808080' }] }, series: [{ name: 'Value', data: YaxisValuesArray }] });}); 解决方案 You can set the tickInterval (http://api.highcharts.com/highstock#yAxis.tickInterval) on the axishttp://jsfiddle.net/blaird/KdHME/$(function () { var chart1 = new Highcharts.Chart({ chart: { renderTo: 'Div1', width: 600, height: 400 }, credits: { enabled: false }, title: { text: 'Productivity Report', x: -20 //center }, xAxis: { lineColor: '#FF0000', categories: [1, 2, 3] }, yAxis: { min: 0, max: 140, tickInterval: 20, lineColor: '#FF0000', lineWidth: 1, title: { text: 'Values' }, plotLines: [{ value: 0, width: 10, color: '#808080' }] }, tooltip: { valueSuffix: '' }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'middle', borderWidth: 0 }, series: [{ name: 'Value', data: [ [1, 10], [2, 20], [3, 30] ] }] });}); 这篇关于如何在Y轴高图上设置点的间隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-10 11:35