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

Styling ticks in VictoryGroup #1190

Closed
4 tasks done
charklewis opened this issue Nov 27, 2018 · 1 comment
Closed
4 tasks done

Styling ticks in VictoryGroup #1190

charklewis opened this issue Nov 27, 2018 · 1 comment

Comments

@charklewis
Copy link

charklewis commented Nov 27, 2018

Bugs and Questions

Checklist

  • This is not a victory-native specific issue. (Issues that only appear in victory-native should be opened here)

  • I have read through the FAQ and Guides before asking a question

  • I am using the latest version of Victory

  • I've searched open issues to make sure I'm not opening a duplicate issue

The Problem

No styling of ticks is working when VictoryAxis is a child of VictoryGroup. I saw this note in the guides, does this mean you are not able to style ticks in this context?

when a component is rendered as a child of another Victory component, or within a custom element with standalone={false} parent styles will be applied to the enclosing tag. Many styles that can be applied to a parent will not be expressed when applied to a .

I am looking to remove the axis line, change the tick labels (Jan, Feb etc) to a grey colour and enlarge their font size.

Reproduction

View sandbox here: https://codesandbox.io/s/xo162p56xp
Style code adapted from: #408

@boygirl
Copy link
Contributor

boygirl commented Dec 10, 2018

@charklewis I took a look at your sandbox, and the main issue was that this.tickStyles was not defined. Also, when you're using axes, it's better to use VictoryChart instead of VictoryGroup since it is designed to account for axis children. Here's an edited sandbox: https://codesandbox.io/s/xzv9v4y8wz

@boygirl boygirl closed this as completed Dec 10, 2018
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