简体   繁体   中英

Decimal values for yAxis categories in Highcharts

I need my yAxis categories to be 0 = 'Poor', 0.25 = 'Below Average', 0.75 = 'Average' 1="Good"

I set the categories right, but Highcharts seems to interpret each point I plot to be equal to "1" step on the yAxis. See http://jsfiddle.net/54cFG/

Ideally, that chart should always show 4 labels on the yAxis and the plotted points should line up at "Below Average" and "Average".

Is there a setting I'm missing? I think I pretty much tried everything at http://www.highcharts.com/ref/

You could always use plot bands to display categories on the Y axis. That way you could still keep the actual values. I have demonstrated that with your code here .

EDIT

Here is another example with the grid lines taken off and the plotBands each with their own color. Here is the color chart if you wan to change any of them.

If you prefer to use the plot bands and no y-axis labels, here is an example of that. I think it works just fine. If the user really wants to see the exact value they can hover over the point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM