Skip to content

Commit

Permalink
fix: add note regarding value casting from remote data source
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jan 20, 2024
1 parent f398314 commit 2a05c53
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/options/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,21 @@ cal.paint({
});
```

:::caution
When using a [`source`](#source) other than a local javascript object, there is no auto-casting, and all values will be parsed as `string`.
If your value is a number, consider using a function to cast it properly, e.g.:

```js
y: (datum) => +datum['key_name']
```

instead of just

```js
y: 'key_name'
```
:::

## `groupY`

Aggregate function, to group all values from the same subDomain.
Expand Down

0 comments on commit 2a05c53

Please sign in to comment.