IBM / gantt-chart

IBM Gantt Chart Component, integrable in Vanilla, jQuery, or React Framework.
https://ibm.github.io/gantt-chart/packages/ibm-gantt-chart-docs/storybook
Apache License 2.0
215 stars 52 forks source link

Is not clear how to change color of bars #9

Open gazambuja opened 5 years ago

gazambuja commented 5 years ago

How to change the color of some activity? Im try to look at palettes, but seems hard just to change the color of some bars. Exist another way?

gazambuja commented 5 years ago

So, the simplest way I find to set color of rows was add this to the config section:

    timeTable: {
              renderer: [{
                  background: {
                    values : [ 'parent', 'child' ],
                    palette : ["#1f78b4", "#33a02c"],
                    getValue: 'row.rowtype',
                  }}
        ]}

And in my json, to every node add the field rowtype: "parent" and rowtype: "child" when was a child node.