mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
Update example chart config type, remove whitespace (#10831)
* Update example chart config type, remove whitespace * update size limit
This commit is contained in:
parent
3557559004
commit
b969ae3d8d
@ -7,7 +7,7 @@ function modifyWebpackConfig(config) {
|
|||||||
module.exports = [
|
module.exports = [
|
||||||
{
|
{
|
||||||
path: 'dist/chart.js',
|
path: 'dist/chart.js',
|
||||||
limit: '78.5 KB',
|
limit: '79 KB',
|
||||||
webpack: false,
|
webpack: false,
|
||||||
running: false
|
running: false
|
||||||
},
|
},
|
||||||
|
@ -124,7 +124,7 @@ When using object notation in a radar chart you still need a labels array with l
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const cfg = {
|
const cfg = {
|
||||||
type: 'pie',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
datasets: [{
|
datasets: [{
|
||||||
data: {
|
data: {
|
||||||
@ -187,7 +187,7 @@ When using typescript, if you want to use a data structure that is not the defau
|
|||||||
```ts
|
```ts
|
||||||
import {ChartData} from 'chart.js';
|
import {ChartData} from 'chart.js';
|
||||||
|
|
||||||
const datasets: ChartData <'bar', {key: string, value: number} [] > = {
|
const datasets: ChartData <'bar', {key: string, value: number} []> = {
|
||||||
datasets: [{
|
datasets: [{
|
||||||
data: [{key: 'Sales', value: 20}, {key: 'Revenue', value: 10}],
|
data: [{key: 'Sales', value: 20}, {key: 'Revenue', value: 10}],
|
||||||
parsing: {
|
parsing: {
|
||||||
|
Loading…
Reference in New Issue
Block a user