You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/customization/README.md
+29-6Lines changed: 29 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ next: ./3d-effects
5
5
6
6
# Customization
7
7
8
-
One of the key features in **Charts.CSS** is the ability to customize the visibility using basic CSS. Frontend developers can target any HTML element and customize it. This philosophical guideline is what makes the framework so flexible and easy to use.
8
+
One of the key features in **Charts.CSS** is the ability to **_customize the visibility using basic CSS_**. Frontend developers can target any HTML element and customize it. This philosophical guideline is what makes the framework so flexible and easy to use.
9
9
10
10
## Custom Styling
11
11
12
-
To add your custom CSS simply add either an `id`or a `class`to your`<table>` tag.
12
+
To add your custom CSS simply add an `id`attribute to the`<table>` tag:
@@ -22,20 +22,43 @@ To add your custom CSS simply add either an `id` or a `class` to your `<table>`
22
22
}
23
23
```
24
24
25
-
Recommended best practice is to add the chart type to the selector. This way the style will apply only on that chart type and not the other types. Why? because each chart type has its own structure and layout. You don't want un-expected side-effects when switching between charts.
25
+
Or add an `id` attribute to a [wrapper element](/components/wrapper/):
It's recommend to add the chart type to your selector. This way the custom style will apply only on that specific chart type and not all the types.
47
+
48
+
```css
49
+
/* Customize only bar charts */
29
50
#my-chart.bar {
30
51
...
31
52
}
32
53
33
-
/*Other style applies only on pie charts */
54
+
/*Customize only pie charts */
34
55
#my-chart.pie {
35
56
...
36
57
}
37
58
```
38
59
60
+
Why is this important? because each chart type has its own structure and layout. You don't want unexpected side-effects when switching between charts types.
61
+
39
62
## Basic Examples
40
63
41
64
There are many ways you can customize the framework. We prepared some basic examples to get you started, separated into 3 topics.
0 commit comments