Skip to content

Commit

Permalink
Merge pull request #116 from Hertz-Hu/patch-1
Browse files Browse the repository at this point in the history
Update dataset.md
  • Loading branch information
plainheart authored Jul 11, 2024
2 parents f5076b2 + 97a69bc commit f9adb7c
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 f9adb7c

Please sign in to comment.