Widget:Chartjs line: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tags: Reverted 2017 source edit |
No edit summary Tag: 2017 source edit |
||
(6 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
<!--{$ID = "donut-$countDonut-$time-$randomValue"}--> | <!--{$ID = "donut-$countDonut-$time-$randomValue"}--> | ||
<div> | <div class="chart-container" style="position: relative;"> | ||
<canvas id="<!--{$ID|escape:'html'}-->"></canvas> | <canvas id="<!--{$ID|escape:'html'}-->"></canvas> | ||
</div> | </div> | ||
<script> | <script> | ||
Line 28: | Line 28: | ||
type: 'line', | type: 'line', | ||
data: { | data: { | ||
labels: [1500, | labels: [1500,'Test',1700,1750,1800,1850,1900,1950,1999,2050], | ||
datasets: [{ | datasets: [{ | ||
data: [86,114,106,106,107,111,133,221,783,2478], | data: [86,114,106,106,107,111,133,221,783,2478], | ||
label: "Africa", | label: "Africa", | ||
borderColor: "#3e95cd", | borderColor: "#3e95cd", | ||
fill: | fill: false | ||
}, { | }, { | ||
data: [282,350,411,502,635,809,947,1402,3700,5267], | data: [282,350,411,502,635,809,947,1402,3700,5267], | ||
label: "Asia", | label: "Asia", | ||
borderColor: "#8e5ea2", | borderColor: "#8e5ea2", | ||
fill: | fill: false | ||
}, { | }, { | ||
data: [168,170,178,190,203,276,408,547,675,734], | data: [168,170,178,190,203,276,408,547,675,734], | ||
label: "Europe", | label: "Europe", | ||
borderColor: "#3cba9f", | borderColor: "#3cba9f", | ||
fill: | fill: false | ||
}, { | }, { | ||
data: [40,20,10,16,24,38,74,167,508,784], | data: [40,20,10,16,24,38,74,167,508,784], | ||
label: "Latin America", | label: "Latin America", | ||
borderColor: "#e8c3b9", | borderColor: "#e8c3b9", | ||
fill: | fill: false | ||
}, { | }, { | ||
data: [6,3,2,2,7,26,82,172,312,433], | data: [6,3,2,2,7,26,82,172,312,433], | ||
label: "North America", | label: "North America", | ||
borderColor: "#c45850", | borderColor: "#c45850", | ||
fill: | fill: false | ||
} | } | ||
] | ] | ||
}, | }, | ||
options: { | options: { | ||
responsive: true, | |||
title: { | title: { | ||
display: true, | display: true, |
Latest revision as of 11:16, 19 March 2024
This widget allows you to add ... widget to your wiki page.
Created by [idea-sketch.com idea-sketch.com]
Using this widget[edit source]
For information on how to use this widget, see ...
Copy to your site[edit source]
To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:Chartjs line.