Skip to content

Commit

Permalink
Update dataset.md
Browse files Browse the repository at this point in the history
Removed 2 Chinese full stop characters in the JavaScript comments. The "previous case" of the "Map from Data to Chart" chapter isn't as it describes, it should be corrected as "next case".
  • Loading branch information
Hertz-Hu authored Jul 10, 2024
1 parent f5076b2 commit 97a69bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contents/en/concepts/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The effect of configuration is shown in [this case](${exampleEditorPath}dataset-

Most of the data described in commonly used charts is a "two-dimensional table" structure, in the previous case, we use a 2D array to contain a two-dimensional table. Now, when we map a series to a column, that column was called a "dimension" and each row was called "item", vice versa.

The dimension can have their name to display in the chart. Dimension name can be defined in the first column (row). In the previous case, `'score'`, `'amount'`, `'product'` are the name of dimensions. The actual data locate from the second row. ECharts will automatically check if the first column (row) contained dimension name in `dataset.source`. You can also use `dataset.sourceHeader: true` to declare that the first column (row) represents the dimension name.
The dimension can have their name to display in the chart. Dimension name can be defined in the first column (row). In the [next case](#map-from-data-to-charts-(series.encode)), `'score'`, `'amount'`, `'product'` are the name of dimensions. The actual data locate from the second row. ECharts will automatically check if the first column (row) contained dimension name in `dataset.source`. You can also use `dataset.sourceHeader: true` to declare that the first column (row) represents the dimension name.

Try to use single `dataset.dimensions` or some `series.dimensions` to define the dimensions, therefore you can specify the name and type together.

Expand All @@ -169,7 +169,7 @@ var option1 = {
dataset: {
dimensions: [
{ name: 'score' },
// can be abbreviated as 'string', to indicate dimension name
// can be abbreviated as 'string', to indicate dimension name
'amount',
// Specify dimensions in 'type'.
{ name: 'product', type: 'ordinal' }
Expand Down Expand Up @@ -478,7 +478,7 @@ var option = {
source: []
},
{
// 3rd Dataset
// 3rd Dataset
source: []
}
],
Expand Down

0 comments on commit 97a69bc

Please sign in to comment.