Template:RawChart
Jump to navigation
Jump to search
This is a more primitive version of Template:Chart, which takes the entire Chart.js config as one json dictionary.
These are the same examples from Template:Chart, recreated in RawChart:
{{RawChart|json= {"type":"line","data":{"datasets":[{"label":"Line","data":[{"x":0,"y":0},{"x":1,"y":1},{"x":2,"y":2},{"x":3,"y":4},{"x":4,"y":8}],"borderColor":"#268bd2","fill":false,"xAxisID":"my-x-axis","yAxisID":"my-y-axis"}]},"options":{"scales":{"xAxes":[{"id":"my-x-axis","type":"linear","scaleLabel":{"display":true,"labelString":"X axis"} }],"yAxes":[{"id":"my-y-axis","type":"linear","scaleLabel":{"display":true,"labelString":"Y axis"} }]},"animation":{"duration":0},"hover":{"animationDuration":0},"responsiveAnimationDuration":0} } }}
*Note: Spaces are added to any "}}" to ensure the template doesn't close prematurely.
Sorry, charts require javascript to load, and therefore can't load on mobile.
{{RawChart|json = {"type":"line","data":{"datasets":[{"label":"JMS Casts/Missile","data":[{"x":1,"y":10},{"x":10,"y":10},{"x":100,"y":10},{"x":1000,"y":14},{"x":10000,"y":59},{"x":100000,"y":509},{"x":1000000,"y":5009},{"x":10000000,"y":50009},{"x":100000000,"y":500009},{"x":1000000000,"y":5000009},{"x":10000000000,"y":50000009}],"borderColor":"#268bd2","fill":false,"xAxisID":"my-x-axis","yAxisID":"my-y-axis"}]},"options":{"scales":{"xAxes":[{"id":"my-x-axis","type":"logarithmic","scaleLabel":{"display":true,"labelString":"# of JMS casts"} }],"yAxes":[{"id":"my-y-axis","type":"logarithmic","scaleLabel":{"display":true,"labelString":"# of Missiles"} }]},"animation":{"duration":0},"hover":{"animationDuration":0},"responsiveAnimationDuration":0} } }}
*Note: A JSON prettifier/minifier is highly recommended for working with this Template.
Sorry, charts require javascript to load, and therefore can't load on mobile.
Click here to refresh the preview above
This template is powered by MediaWiki:Chart.js, using Fandom Chart.js. Chart.js documentation can be found here.