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

Unable to use a function to set the width of each element of a polar chart #998

Closed
4 tasks done
RichardFevrier opened this issue May 9, 2018 · 2 comments · Fixed by FormidableLabs/victory-core#373
Closed
4 tasks done

Comments

@RichardFevrier
Copy link

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

When we are using a VictoryBar nested in a VictoryChart type polar we are not able to use a function to set the width in the style attribute

Reproduction

You can reproduce this directly in the editor https://formidable.com/open-source/victory/guides/polar-charts/#creating-polar-charts by replacing the code with this one :

<VictoryChart polar
  domain={{ x: [0, 360] }}
  height={400} width={400}
>
  <VictoryBar
    style={{ data: { fill: "#c43a31", width: (d) => 50 }}} // <= here is the problem
    data={sampleDataPolar}
  />
</VictoryChart>

You can play by removing the polarkeyword and see the difference.

@omorhefere
Copy link

How did you fix this?

@boygirl
Copy link
Contributor

boygirl commented Jul 31, 2018

@omorhefere this was fixed with a change in the library. If you're still seeing this issue, please let me know what version of Victory you're using. A code snippet or reproduction in code sandbox also helps a lot.

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 a pull request may close this issue.

3 participants