mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
✨ Add bubbleChart example
This commit is contained in:
52
examples/BubbleExample.js
Normal file
52
examples/BubbleExample.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
import BubbleChart from '../BaseCharts/Bubble'
|
||||||
|
|
||||||
|
export default BubbleChart.extend({
|
||||||
|
ready () {
|
||||||
|
this.render({
|
||||||
|
datasets: [
|
||||||
|
{
|
||||||
|
label: 'Data One',
|
||||||
|
backgroundColor: '#f87979',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
x: 20,
|
||||||
|
y: 25,
|
||||||
|
r: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: 40,
|
||||||
|
y: 10,
|
||||||
|
r: 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: 30,
|
||||||
|
y: 22,
|
||||||
|
r: 30
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Data Two',
|
||||||
|
backgroundColor: '#7C8CF8',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
x: 10,
|
||||||
|
y: 30,
|
||||||
|
r: 15
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: 20,
|
||||||
|
y: 20,
|
||||||
|
r: 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: 15,
|
||||||
|
y: 8,
|
||||||
|
r: 30
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user