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/docs/anatomy.md
+59-48Lines changed: 59 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ next: ../../components/
5
5
6
6
# Anatomy
7
7
8
-
Charts are made of several [components](../components/) grouped together. The structure is built with a simple HTML `<table>` element. The different components are styled using **CSS classes** which are defined for the parent element but applied on inner HTML elements.
8
+
Charts are made of several [components](../components/) grouped together. The structure is built with a simple HTML `<table>` element. The different components are styled using **CSS classes** which are defined for the parent element but affect inner HTML elements.
9
9
10
10
## Chart Layers
11
11
@@ -88,23 +88,23 @@ The following animation shows how the various elements are separated into layers
88
88
<tbody>
89
89
<tr>
90
90
<th> </th>
91
-
<td style="--size:0;"></td>
91
+
<td style="--size:0;"></td>
92
92
</tr>
93
93
<tr>
94
94
<th> </th>
95
-
<td style="--size:0;"></td>
95
+
<td style="--size:0;"></td>
96
96
</tr>
97
97
<tr>
98
98
<th> </th>
99
-
<td style="--size:0;"></td>
99
+
<td style="--size:0;"></td>
100
100
</tr>
101
101
<tr>
102
102
<th> </th>
103
-
<td style="--size:0;"></td>
103
+
<td style="--size:0;"></td>
104
104
</tr>
105
105
<tr>
106
106
<th> </th>
107
-
<td style="--size:0;"></td>
107
+
<td style="--size:0;"></td>
108
108
</tr>
109
109
</tbody>
110
110
</table>
@@ -113,23 +113,23 @@ The following animation shows how the various elements are separated into layers
113
113
<tbody>
114
114
<tr>
115
115
<th> </th>
116
-
<td style="--size:0.2;"></td>
116
+
<td style="--size:0.2;"></td>
117
117
</tr>
118
118
<tr>
119
119
<th> </th>
120
-
<td style="--size:0.4;"></td>
120
+
<td style="--size:0.4;"></td>
121
121
</tr>
122
122
<tr>
123
123
<th> </th>
124
-
<td style="--size:0.6;"></td>
124
+
<td style="--size:0.6;"></td>
125
125
</tr>
126
126
<tr>
127
127
<th> </th>
128
-
<td style="--size:0.8;"></td>
128
+
<td style="--size:0.8;"></td>
129
129
</tr>
130
130
<tr>
131
131
<th> </th>
132
-
<td style="--size:1;"></td>
132
+
<td style="--size:1;"></td>
133
133
</tr>
134
134
</tbody>
135
135
</table>
@@ -162,13 +162,23 @@ The following animation shows how the various elements are separated into layers
162
162
163
163
As was previously mentioned, the layers are composed of different HTML elements nested inside the `<table>` element.
164
164
165
-
For example, the [heading](../components/heading/) layer is created from the `<caption>` element, the data [labels](../components/labels/) are created from the `<th>` element, the [data](../components/data/)/[dataset](../components/datasets/) uses `<td>` elements, and the [axes](../components/axes/) layer is generated from the `<tbody>` elements.
165
+
*[Heading layer](../components/heading/) - generated from the `<caption>` element.
166
+
*[Labels layer](../components/labels/) - generated from the `<th>` elements.
167
+
*[Data layer](../components/data/) - generated from the `<td>` elements.
168
+
*[Axes layer](../components/axes/) - generated from the `<tbody>` element.
166
169
167
-
## HTML Table
170
+
## Chart Structure
168
171
169
-
The raw data is a basic HTML `<table>` element visible to search engines and screen readers:
172
+
With the help of CSS classes, the HTML table displayed as a chart. These utility classes change the appearance of the table by applying styles on various inner HTML elements.
170
173
171
-
<table>
174
+
To transform the `<table>` into a chart, only two inner HTML elements are required, the `<tbody>` and `<td>` elements, without them, nothing works. The other elements are optional. However, we recommend using all the elements, including `<caption>`, `<thead>`, and `<th>`, as they provide more clarity for search-engines and screen-reader users.
175
+
176
+
### HTML Table
177
+
178
+
The following table, for example, provides meaningful information like a heading, labels and data. With semantic markup the information visible to search-engines and screen readers.
0 commit comments