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

Correct syntax for chart overrides #425

Open
eastmb opened this issue Apr 20, 2018 · 1 comment
Open

Correct syntax for chart overrides #425

eastmb opened this issue Apr 20, 2018 · 1 comment
Assignees

Comments

@eastmb
Copy link

eastmb commented Apr 20, 2018

I have a map with a popup link that opens a chart of related data. I want to move beyond the default axis labels and chart colors. I have working code for bar chart color overrides but I'm currently unable to get chart.overrides to work for axis labels.

code - https://github.com/eastmb/DeerHarvest/tree/gh-pages
result - https://eastmb.github.io/DeerHarvest/

bar chart marks override (works):

chart.override = {
marks: [{
properties: {
hover: {
fill: {
value: "#B80F0F"
}
},
update: {
fill: {
value: "#B80F8F"
}
}
}
}]
};

attempted axis override code (not working):

var overrides = {
"categoryAxis": {
"labelRotation": 70
}
};
chart.overrides = overrides;

@benstoltz
Copy link
Member

benstoltz commented May 8, 2018

Hi @eastmb sorry for taking a while to get back to you on this issue. So a few things based on looking at your code. One you're currently using override that should be swapped over to overrides. Secondly you might want to update your version of cedar to 1.0.0-beta.6.

Now there does seem to be a legitimate bug with regards to labelRotation. I'm not quite sure what's going on, but something is mucking up somewhere in the line. But it only seems to be effecting labelRotation. For example this works fine:

"overrides": {
    "categoryAxis": {
      "color": "red"
    }
  }

I'd suggest playing around and seeing what's working and what's not. I'll be digging in further to see what's up with labelRotation.

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

No branches or pull requests

2 participants