-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react-chart): add palette plugin #1408
feat(react-chart): add palette plugin #1408
Conversation
|
||
import { Scale, Theme } from '@devexpress/dx-react-chart'; | ||
|
||
const materialUI = ['#2196F3', '#F44336', '#4CAF50', '#FFEB3B', '#E91E63', '#9C27B0']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should use MaterialDesignColors
instead MaterialUI
because material-ui is only react library.
Add more colors to that palette from official site https://material.io/design//color/the-color-system.html#tools-for-picking-colors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change the name to MaterialDesignColors
.
And why does we need to add more colors to that palette?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because colors are repeated and it looks bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But other schemes has not many colors too.
Can we implement this feature without add |
@MaximKudriavtsev I think this was the point because we have plugin structure. |
@Krijovnick but this plugin is required. I should always add this plugin to my markup, I think this is problem. |
@@ -0,0 +1,19 @@ | |||
# Palette Plugin Reference | |||
|
|||
The `Palette` plugin is used to colorize chart with default or user colors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Palette plugin is used to colorize chart with user colors.
without default colors, because to apply default colors not necessary to add this plugin
|
||
## Basic Setup | ||
|
||
Use `scheme` property in `Palette` plugin to set up a Chart with custom color. In the following example demonstrates the changing of the colors using d3 library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a link to Palette API
|
||
Name | Type | Default | Description | ||
-----|------|---------|------------ | ||
scheme? | Array<string> | ['#0070ff', '#d72e3d', '#249d3d', '#ffb90c', '#1698af', '#616a72'] for [Bootstrap4](https://www.npmjs.com/package/@devexpress/dx-react-chart-bootstrap4); ['#40C4FF', '#FF5252', '#00C853', '#FFEB3B', '#FF4081', '#E040FB'] for [Material UI](https://www.npmjs.com/package/@devexpress/dx-react-chart-material-ui); | Array of colors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scheme
property is required in propTypes
No description provided.