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

Documentation example component #82

Open
atepoorthuis opened this issue Mar 22, 2019 · 0 comments
Open

Documentation example component #82

atepoorthuis opened this issue Mar 22, 2019 · 0 comments
Assignees

Comments

@atepoorthuis
Copy link
Contributor

Right now we are using a somewhat convoluted strategy to include both the code for an example as well as its actually rendered state.

So this:

The `vgg-rectangle` mark is used to plot rectangular elements.

<div style="display: flex;
	justify-content: space-around;
	align-items: center"
>

<div>

<MarkRectangleSimple />

</div>

<div style='width: 40%; height: 100%;'>

```html
<vgg-rectangle
  :x="row.year"
  :y1="row.population"
  :y2="0"
  :w="2.5"
  fill="#c66366"
/>
``` Turns into: ![image](https://user-images.githubusercontent.com/1752727/54805723-c7b61780-4cb2-11e9-9da3-e87483aec21a.png)

But it doesn't help with the readability of the .md and also requires us to create another adhoc component with the same code in docs/.vuepress/components/. Perhaps this would be a good case for creating a component that takes a valid vue-gg graph as one of its props and displays both the highlighted syntax as well as the rendered svg?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants