Skip to content
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

PXD-1368 fix(localconf): vis colors in localconf.js #338

Merged
merged 1 commit into from
Aug 15, 2018
Merged

Conversation

qingyashu
Copy link
Contributor

Change visualization colors in localconf.js: since only charts are using those colors, let helper access the colors, and remove all localTheme props from previous chart-related components.

@qingyashu qingyashu requested a review from abgeorge7 August 9, 2018 16:09
stroke={localTheme['barGraph.lineColor']}
fill={localTheme['barGraph.lineColor']}
stroke='#666666'
fill='#666666'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to make these configurable, like pass a prop to the chart?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for now we only have 1 style (with white background), it is not necessary to make text colors configurable...

Copy link
Contributor

@abgeorge7 abgeorge7 Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, but if we want to use this chart anywhere else in the future we'd want it to be a prop not hardcoded --> moving to separate ticket to customize all styles [PXD-1521]

src/localconf.js Outdated
'pieChartTwoColor.pie1Color': '#3283c8',
'pieChartTwoColor.pie2Color': '#e7e7e7',
tableBarColor: '#7d7474',
const visColor = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename visColor, categoryColor9, and categoryColor2? I feel like they could be more descriptive like colorsForCharts or something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure~ How about visColor->colorsForCharts, categoryColor9 -> category9Colors, categoryColor2 -> category2Colors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colorsForCharts is good, but I think the other two are still not clear in terms of what they contain, can they be something like barChartColors and pieChartColors

Copy link
Contributor

@abgeorge7 abgeorge7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Only things I have are it looks like there's an extra Color/index.js file that is empty and I was also wondering if it would be better to use color variables in the localconf.js file?

@qingyashu
Copy link
Contributor Author

qingyashu commented Aug 15, 2018

Committed by mistake, sorry about that, just remove the useless file, please check again~

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