Skip to content

Allow usage of custom color for each bar on ProgressChart#431

Merged
Hermanya merged 2 commits into
chart-kit:masterfrom
glibas:master
Nov 15, 2020
Merged

Allow usage of custom color for each bar on ProgressChart#431
Hermanya merged 2 commits into
chart-kit:masterfrom
glibas:master

Conversation

@glibas

@glibas glibas commented Nov 3, 2020

Copy link
Copy Markdown
Contributor

Adds extra property 'colors' to ProgressChart data

e.g.

const progressChartData = {
  labels: ["Swim", "Bike", "Run"], // optional
  data: [0.2, 0.5, 0.3],
  colors: ["#dfe4ea", "#ced6e0", "#a4b0be"]
};

can be switched on by setting withCustomBarColorFromData to true

e.g.

 <ProgressChart
         data={progressChartData}
         width={width}
         height={height}
         chartConfig={chartConfig}
         style={graphStyle}
         hideLegend={false}
         withCustomBarColorFromData={true}
/>

@Hermanya Hermanya merged commit dc4e05e into chart-kit:master Nov 15, 2020
@Hermanya

Copy link
Copy Markdown
Contributor

thank you for your contribution, this is now available in 6.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants