user2317558
user2317558

Reputation: 264

Displaying small values using highcharts.js

I'm plotting a bar chart which has some large values and some smaller ones, the way in which the y-axis scales makes my smaller values not appear on the chart (no bar is displayed for the smaller values), but you can see the value when you mouse over.

This makes it really hard to differentiate between data points with value 0 and data points with very small values, is there a way that I can make the small value data points show up as bars on the chart?

Upvotes: 4

Views: 4247

Answers (3)

Elaine Ong
Elaine Ong

Reputation: 9

It works!

Set minPointLength, then the zero values into null.

jsfiddle.net/nxehwL7r/2/

Upvotes: -1

wergeld
wergeld

Reputation: 14442

You can try doing a different scale of the yAxis or using the 'logarithmic' type. See updated fiddle. Note that this does not work in all cases. The HighCharts user voice site has been asking for scale-break capabilities for a while now.

EDIT

A log scale cannot have a value of 0. So, you will either have to deal with not showing this point in a tooltip or hoping you dont get it as a value. I have tried to do some overrides of the tooltip function to read from the series.data values but that did not work out and my javascript is not so much good. Basically we are stuck with either points that do not show do to huge range differences or points that show excpet when 0 when using log scale. I go with the latter.

Upvotes: 1

Paweł Fus
Paweł Fus

Reputation: 45079

You can also set minPointLength for series: http://jsfiddle.net/V6fvX/2/

Upvotes: 1

Related Questions