Skip to content

Commit 88113c7

Browse files
Use space indentation in the readme
1 parent 7230b2a commit 88113c7

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

readme.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,39 @@ Web component implementation of a trend-line.
1010

1111
Import `trend-line` and set CSS custom properties:
1212

13-
```
13+
html```
1414
<head>
15-
<script type="module">
16-
import "https://cdn.skypack.dev/@nextbitlabs/trend-line";
17-
</script>
18-
<style>
19-
/*
20-
CSS custom properties penetrate the Shadow DOM.
21-
They are useful to provide custom styling.
22-
*/
23-
trend-line {
24-
--color: #333; /* default black */
25-
--stroke-width: 2px; /* default 2px */
26-
--background: #eee; /* default transparent */
27-
}
28-
</style>
15+
<script type="module">
16+
import "https://cdn.skypack.dev/@nextbitlabs/trend-line";
17+
</script>
18+
<style>
19+
/*
20+
CSS custom properties penetrate the Shadow DOM.
21+
They are useful to provide custom styling.
22+
*/
23+
trend-line {
24+
--color: #333; /* default black */
25+
--stroke-width: 2px; /* default 2px */
26+
--background: #eee; /* default transparent */
27+
}
28+
</style>
2929
</head>
3030
```
3131
3232
Use the custom element:
3333
34-
```
34+
html```
3535
<body>
36-
<trend-line width="100" height="100" margin="20"></trend-line>
36+
<trend-line width="100" height="100" margin="20"></trend-line>
3737
</body>
3838
```
3939

4040
Set the data to plot:
4141

42-
```
42+
html```
4343
<script>
44-
const element = document.querySelector("trend-line");
45-
element.data = [[1, 3], [2, 5], [3, 2]];
44+
const element = document.querySelector("trend-line");
45+
element.data = [[1, 3], [2, 5], [3, 2]];
4646
</script>
4747
```
4848

0 commit comments

Comments
 (0)