Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit c8942f2

Browse files
doc(#16): add slide chart
1 parent 5d1e3a8 commit c8942f2

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
95.5 KB
Loading

doc/slides/slides.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Some templates offer extra features as for example the slide [Code](#slide-code)
1111
- [Slide: Content](#slide-content)
1212
- [Slide: Split](#slide-split)
1313
- [Slide: Gif](#slide-gif)
14+
- [Slide: Chart](#slide-chart)
1415
- [Slide: Youtube](#slide-youtube)
1516
- [Slide: Code](#slide-code)
1617
- [Slide: Author](#slide-author)
@@ -36,6 +37,10 @@ Some templates offer extra features as for example the slide [Code](#slide-code)
3637

3738
<img src="https://github.com/fluster/deckdeckgo/blob/master/doc/slides/deckdeckgo-slide-gif-layout.gif" width="200px">
3839

40+
* [Chart](#slide-chart)
41+
42+
<img src="https://github.com/fluster/deckdeckgo/blob/master/doc/slides/deckdeckgo-slide-chart-layout.gif" width="200px">
43+
3944
* [Youtube](#slide-youtube)
4045

4146
<img src="https://github.com/fluster/deckdeckgo/blob/master/doc/slides/deckdeckgo-slide-youtube-layout.png" width="200px">
@@ -308,6 +313,65 @@ The following theming options will affect this component if set on its host or p
308313
| --slide-padding-start | 32px | Padding left of the all slide |
309314
| --zIndex | 1 | The z-index of the slide |
310315

316+
### Slide: Chart
317+
318+
The "Chart" slide let you draw easily charts in your presentation.
319+
320+
#### Layout
321+
322+
<img src="https://github.com/fluster/deckdeckgo/blob/master/doc/slides/deckdeckgo-slide-chart-layout.png" width="450px">
323+
324+
#### Usage
325+
326+
The "Chart" slide's Web Component could be integrated using the tag `<deckgo-slide-chart/>`.
327+
328+
```
329+
<deckgo-slide-chart src="./assets/csv/data-pie-chart.csv">
330+
<h1 slot="title">My Pie chart</h1>
331+
</deckgo-slide-chart>
332+
```
333+
334+
##### Slots
335+
336+
The slot `title` is optional.
337+
338+
##### Chart components
339+
340+
The slide "Chart" relies on the charts components `<deckgo-pie-chart/>` and `<deckgo-line-chart/>` which are described in the components [documentation](https://github.com/fluster/deckdeckgo/blob/master/doc/components/components.md).
341+
342+
##### Installation
343+
344+
**Important note**: The [DeckDeckGo] charts components are provided in separate extra library. If you wish to add charts to your presentation, you will need to install this extra component from a CDN or [npm](https://www.npmjs.com/package/deckdeckgo). See the related documentation from its [installation guide](https://github.com/fluster/deckdeckgo-charts#getting-started).
345+
346+
The reasons behind are the following:
347+
348+
1. If you don't use charts, you will not have to install unnecessary dependencies
349+
2. Cherry on the cake, the [DeckDeckGo] charts Web Component could be use in [DeckDeckGo] as in any other web projects
350+
351+
#### Attributes
352+
353+
This slide component offers the exact same attributes as the [DeckDeckGo] charts Web Component, see its [documentation](https://github.com/fluster/deckdeckgo-charts) for the details.
354+
355+
#### Theming
356+
357+
The following theming options will affect this component if set on its host or parent.
358+
359+
| CSS4 variable | Default | Note |
360+
| -------------------------- |:-----------------:|:-----------------:|
361+
| --background | | |
362+
| --color | | |
363+
| --slide-padding-top | 16px | Padding top of the all slide |
364+
| --slide-padding-end | 32px | Padding right of the all slide |
365+
| --slide-padding-bottom | 16px | Padding bottom of the all slide |
366+
| --slide-padding-start | 32px | Padding left of the all slide |
367+
| --zIndex | 1 | The z-index of the slide |
368+
| --slide-chart-margin-top | 32px | Margin top of the chart inside its container |
369+
| --slide-chart-margin-end | 96px | Margin right of the chart inside its container |
370+
| --slide-chart-margin-bottom | 32px | Margin bottom of the chart inside its container |
371+
| --slide-chart-margin-start | 32px | Margin left of the chart inside its container |
372+
373+
Furthermore, this slide component offers the exact same CSS4 variables as the [DeckDeckGo] charts Web Component, see its [documentation](https://github.com/fluster/deckdeckgo-charts) for the details.
374+
311375
### Slide: Youtube
312376

313377
The "Youtube" slide let you add easily a [Youtube](https://youtube.com) video to your presentation.

0 commit comments

Comments
 (0)