Charts | Christoph Pahmeyer | Observable
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
Comments (5)
Marcus Collier
Jan 29, 2022
Is the color of each bar customizable? In effect, six colors for example
Christoph Pahmeyer
Feb 8, 2022
Yep, as mentioned above, the color array specifies the color of each dataset. So in order to get six different coloured bars, you would need to define six different datasets.
Reply
Marcus Collier
Feb 7, 2022
Can the array of colors be supported by bar charts? A select color for each bar
Christoph Pahmeyer
Feb 8, 2022
Yes, for the bar charts, the color array corresponds to each given dataset: bar({ data: [ { name: "Category 1", "Dataset 1": 423, "Dataset 2": 0, "Dataset 3": 0 }, { name: "Category 2", "Dataset 1": 0, "Dataset 2": 350, "Dataset 3": 0 }, { name: "Category 3", "Dataset 1": 0, "Dataset 2": 0, "Dataset 3": 20 } ], // color array copied from
https://observablehq.com/@makio135/give-me-colors
// patterns by RJ Andrews
https://github.com/infowetrust/albumcolors
colorScheme: [patterns[3], "#FC9D9A", "#F9CDAD", "#C8C8A9", "#83AF9B"], pattern: true })
Marcus Collier
Feb 9, 2022
Thanks Christoph
Reply
Add comment
Subscribe to notifications
Observable
Sign in
Christoph Pahmeyer
24
Reply
Reply
Add comment
Subscribe to notifications
10
Charts | Christoph Pahmeyer | Observable