Closed swetakedia closed 6 years ago
I did some debugging and figured out that some values you give are null
. That confuses the automatic scale generation. There are two ways forward. Either set your own scales or replace the null
with 0
so the code recognizes your data as numeric.
https://github.com/codesuki/react-d3-components/blob/master/src/DefaultScalesMixin.jsx#L98
Hi @codesuki what type of function am I supposed to write in order to get the legends too.
If you supply your own colorScale
you can use the same scale to build any legend you like with any react code.
This tooltipHtml feature isn't working for me. I have also declared this variable:
var tooltip = function(x, y0, y, total) { console.log(y.toString()) return y.toString(); };
the console.log(y.toString()) works here but doesn't show on the UI?
Hi @codesuki
This tooltipHtml feature isn't working for me. I have also declared this variable:
var tooltip = function(x, y0, y, total) { console.log(y.toString()) return y.toString(); };
the console.log(y.toString()) works here but doesn't show on the UI?
It's for grouped bar chart @codesuki .
I have few data which I have implemented using Bar chart using grouped bar chart. However the rendering is not as expected. The numbers in Y axis is getting defined randomly. Really want to implement this successfully. Appreciate any help.
PFB my code:
Also I have attached the output which axios.get('/ledgers/public') is returning. data.txt
Following is screenshot of the rendered chart as per data:
I am wondering why the min value in Y axis is not 0? and the chart is also not rendered properly.