Dc.js with React: how to make a grouped bar chart?

84 views Asked by At

Reference to this link https://jsfiddle.net/gordonwoodhull/tcraqj5e/6/ Can someone help me create a grouped bar chart using react-dc-js? I was able to create a dimension and group like in this link, however, unable to figure out as to how to use the following parts in the code:

 group={() => {
         return [
          speedSumGroup,
                "1",
                sel_stack("1"),
              ];
            }}

  for (var i = 2; i < 6; ++i) {
        chart.stack(speedSumGroup, "" + i, sel_stack(i));
    }

Here is a Fiddle I tried. I am unable to add react-dc-js to the fiddle however has the structure of code I am using.

https://jsfiddle.net/Physicalpixel/nmL04b5z/97/

0

There are 0 answers