Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix book chart rendering for basic charts #250

Merged
merged 3 commits into from
Nov 23, 2024

Conversation

Nick-Pearson
Copy link
Contributor

First set of changes for #248
Here you can see the updated github site hosted under my own user account https://npearson.co.uk/plotly.rs/content/recipes/basic_charts/scatter_plots.html

  • Changed all the basic charts to use #include to reference the latest rendered file
  • Added a skeleton github action to automate building and pushing the book

If this approach is ok then I will do the other kinds of graph in the book

@andrei-ng
Copy link
Collaborator

andrei-ng commented Nov 20, 2024

@Nick-Pearson , thanks for the PR. Will check it by the end of this week. At a quick glance it looks great 😃

// colored_and_styled_scatter_plot();
// large_data_sets();
// categories_scatter_chart();
write_example_to_html(simple_scatter_plot(false), "simple_scatter_plot");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish there was a nicer way we could achieve this, but I think it is a small price to pay for the benefit of having the examples are compiled and baked in the book.

@andrei-ng
Copy link
Collaborator

andrei-ng commented Nov 23, 2024

@Nick-Pearson Going to merge this in. If you are willing to do the rest of the examples, that would be awesome. I am going to check in the meantime if using the mdbook's preprocessor custom command could help us automatically run the cargo run to build the html's for the examples

@andrei-ng andrei-ng merged commit a877aee into plotly:main Nov 23, 2024
19 checks passed
@Nick-Pearson
Copy link
Contributor Author

Thanks @andrei-ng
Happy to do the rest of the examples

This GitHub action was a jumping off point so it would be good to improve this process further.
I was also unsure whether we should pin to a specific version of mdbook in the GitHub action to avoid unintentional changes between versions

@andrei-ng
Copy link
Collaborator

andrei-ng commented Nov 23, 2024

Great! Looking forward to the next PRs :)
Yes, not pinning a specific version is wise.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants