mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
Update Rader initializer and data structure keys.
This commit is contained in:
parent
f32d62722a
commit
942cf5e718
@ -15,7 +15,11 @@ They are often useful for comparing the points of two or more different data set
|
|||||||
###Example usage
|
###Example usage
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var myRadarChart = new Chart(ctx).Radar(data, options);
|
var myRadarChart = new Chart(ctx,{
|
||||||
|
type:'radar',
|
||||||
|
data: data,
|
||||||
|
options: options
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
###Data structure
|
###Data structure
|
||||||
@ -25,22 +29,22 @@ var data = {
|
|||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
label: "My First dataset",
|
label: "My First dataset",
|
||||||
fillColor: "rgba(220,220,220,0.2)",
|
backgroundColor: "rgba(220,220,220,0.2)",
|
||||||
strokeColor: "rgba(220,220,220,1)",
|
borderColor: "rgba(220,220,220,1)",
|
||||||
pointColor: "rgba(220,220,220,1)",
|
pointBackgroundColor: "rgba(220,220,220,1)",
|
||||||
pointStrokeColor: "#fff",
|
pointBorderColor: "#fff",
|
||||||
pointHighlightFill: "#fff",
|
pointHoverBackgroundColor: "#fff",
|
||||||
pointHighlightStroke: "rgba(220,220,220,1)",
|
pointHoverBorderColor: "rgba(220,220,220,1)",
|
||||||
data: [65, 59, 90, 81, 56, 55, 40]
|
data: [65, 59, 90, 81, 56, 55, 40]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "My Second dataset",
|
label: "My Second dataset",
|
||||||
fillColor: "rgba(151,187,205,0.2)",
|
backgroundColor: "rgba(151,187,205,0.2)",
|
||||||
strokeColor: "rgba(151,187,205,1)",
|
borderColor: "rgba(151,187,205,1)",
|
||||||
pointColor: "rgba(151,187,205,1)",
|
pointBackgroundColor: "rgba(151,187,205,1)",
|
||||||
pointStrokeColor: "#fff",
|
pointBorderColor: "#fff",
|
||||||
pointHighlightFill: "#fff",
|
pointHoverBackgroundColor: "#fff",
|
||||||
pointHighlightStroke: "rgba(151,187,205,1)",
|
pointHoverBorderColor: "rgba(151,187,205,1)",
|
||||||
data: [28, 48, 40, 19, 96, 27, 100]
|
data: [28, 48, 40, 19, 96, 27, 100]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -174,4 +178,4 @@ Calling `removeData()` on your Chart instance will remove the first value for al
|
|||||||
```javascript
|
```javascript
|
||||||
myRadarChart.removeData();
|
myRadarChart.removeData();
|
||||||
// Other points will now animate to their correct positions.
|
// Other points will now animate to their correct positions.
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user