Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/

like image 890
Naren Avatar asked May 15 '12 17:05

Naren


People also ask

How do I change the y axis value in Highcharts?

A simpler way to go about this is using the tickInterval attribute: yAxis: { title: { text: 'Percent' }, tickInterval: 10, labels: { formatter: function(){ return this. value + '%'; } } }, That will force your axis intervals to show up as you requested.

Can we plot two Y axis on the same chart in Highcharts?

Chart showing use of multiple y-axes, where each series has a separate axis. Multiple axes allows data in different ranges to be visualized together. While this in some cases can cause charts to be hard to read, it can also be a powerful tool to illustrate correlations.


1 Answers

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.

like image 121
Linger Avatar answered Sep 21 '22 02:09

Linger