I have to represent a data in C3
bar charts. The problem is the dataset usually contains one or two very large values with the other much smaller values(smaller in comparison). This results in very tall bars next to bars that are almost invisible. I know using scale breaks like this can solve the problem. But i have not found a single example in C3
that even mentions it.
Is there any way to create the scale breaks in C3 charts?
If not, are there any alternative open source JS
libraries to do it?
How to create scale breaks in c3 charts
815 views Asked by yohannist At
1
You could transform the values and the scale using a d3 linear scale with split domains.
And then draw the split using multiple grid lines
HTML
Script
You have to use grid lines and not regions because the region layer is below the bars layer (the grid layer is above the bar layer)
CSS
This consists of a (thick) fill line and 2 border lines
You could also style it better using a squiggly pattern or position an HTML element with a squiggly background over it.
Fiddle - http://jsfiddle.net/tdfpj3oc/