We're working on a project that charts the sales per country for two groups. The challenge is that since our prototype is focused on the US the sales in the US always dwarf all other countries. What we'd like to do is set a minimum height for any bar that is >0 so that the user will be able to see all the bars and know to mouse over for the count on the hover state.
I've attached an image to show how the scale of the sales in the US makes the sales in the countries to the right look like 0. In most cases only the US appears but we never show a country along the bottom unless there is at least 1 sale.
Anyway to define a minimum height so that there is always some bar present? We tried adding a border but that didn't work in the case where there was such a small # of sales relative to the large bar.
Thanks!
Yes, you can use minPointLength: http://api.highcharts.com/highstock#plotOptions.column.minPointLength
Unless the average viewer of this data is accustomed to working with log-scaled data, it is not a good idea to scale it that way. People will compare the length of the bars, as they should, and will have a completely unrealistic impression of the data.
The difference between 1 pixel and 0 pixels will be enough to show that there is a value there, but will not be enough to skew the data in any meaningful way, in most cases.
One thing you could consider is using a logarithmic scale:
http://www.highcharts.com/demo/line-log-axis
yAxis: {
type: 'logarithmic'
},
That would allow you to visualize the different heights even if one bar was several orders of magnitude greater than the others.
Anything else would be skewing your data if it really is so small that it can't be seen when you plot it initially.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With