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

Broken chart examples #1887

Closed
dlabrecq opened this issue Apr 29, 2019 · 3 comments
Closed

Broken chart examples #1887

dlabrecq opened this issue Apr 29, 2019 · 3 comments

Comments

@dlabrecq
Copy link
Member

dlabrecq commented Apr 29, 2019

I recently discovered that the React examples have been deleted, replaced with an .md file via #1656. :(

Unfortunately, the CSS that was written for the chart examples has been lost. The chart examples look horrible now.

It's difficult not being able to write React based examples using React. However, can we please have a way to include CSS with the examples?

@dlabrecq
Copy link
Member Author

dlabrecq commented Apr 29, 2019

Tooltips don't overflow:
Screen Shot 2019-04-29 at 5 41 20 PM

Stack Chart bars are off axis:
Screen Shot 2019-04-29 at 5 39 14 PM

Pie chart legend should appear on the right:
Screen Shot 2019-04-29 at 5 39 36 PM

Donut chart is huge:
Screen Shot 2019-04-29 at 5 40 22 PM

Bar chart is ridiculously enormous:
Screen Shot 2019-04-29 at 5 40 43 PM

@redallen
Copy link
Contributor

redallen commented May 1, 2019

A few notes on this...

  1. You are still writing React-based examples using React. These markdown files actually give you more flexibility. Now since the docs use MDX instead of MD, your file gets converted to a React component and you can do everything you could do in a React component in your MDX.
  2. Many parts of chart examples had problems because of hardcoded widths/heights for the react-live container which changed size when I converted them to MD. I did my best to convert them, but if I recall correctly I had to add lots of style={{}} tags, since at first the MD couldn't have styles included. I documented the axes problem in React-charts Axes Hidden #1673 .
  3. This PR adds the old CSS to the chart pages, but those old style={{}} tags still need to be cleaned up and classNames potentially changed. This is in my backlog, but you are probably the person that best understands the Victory styles that need to be applied to which <div> containers. It would be awesome if you could also document it in the MDX so consumers can copy/paste the styles and have nice looking charts!

@dlabrecq
Copy link
Member Author

This has been fixed with my lastest PR.

#1964

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