j-BarChart
Please review an example and keep a data-source.
Configuration:
paddingbars {Number}padding between bars (default:5)paddinggroup {Number}padding between groups of bars (default:10)radius {Number}enables presentation mode (default:2)offsetX {Number}An offset X for value tooltip (default:10)offsetY {Number}An offset Y for value tooltip (default:10)templateX {String}Tangular template for X axis (default:{{ value }})templateY {String}Tangular template for Y axis (default:{{ value | format(0) }})height {Number/String}height (default:0= auto-height) orstringis meant as a parent elementwidth {Number/String}width (default:0= auto-width) orstringis meant as a parent elementlimit {Number}a maximum limit of value for Y axis (default:0)pl {Number}left padding for axis (default:0)pr {Number}lines right padding (default:10)pt {Number}lines top padding (default:10)pb {Number}lines bottom padding (default:25)prselected {Number}right padding for selected value (default:0)marginW {Number}a margin forwidthmarginH {Number}a margin forheight
Use it with <ui-component name="barchart">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<div class="container">
<div class="row">
<div class="col-sm-6">
<ui-component name="barchart" path="values"></ui-component>
</div>
</div>
</div>
<script>
var values = [];
values.push({
name: 'Apples',
values: [{ x: 2009, y: 100 }, { x: 2010, y: 120 }, { x: 2011, y: 130 }, { x: 2012, y: 150 }, { x: 2013, y: 50 }, { x: 2014, y: 200 }, { x: 2015, y: 80 }, { x: 2016, y: 170 }, { x: 2017, y: 300 }]
});
values.push({
name: 'Oranges',
values: [{ x: 2009, y: 40 }, { x: 2010, y: 80 }, { x: 2011, y: 400 }, { x: 2012, y: 170 }, { x: 2013, y: 90 }, { x: 2014, y: 60 }, { x: 2015, y: 160 }, { x: 2016, y: 120 }, { x: 2017, y: 180 }]
});
values.push({
name: 'Bananas',
values: [{ x: 2009, y: 80 }, { x: 2010, y: 40 }, { x: 2011, y: 300 }, { x: 2012, y: 200 }, { x: 2013, y: 120 }, { x: 2014, y: 150 }, { x: 2015, y: 220 }, { x: 2016, y: 40 }, { x: 2017, y: 80 }]
});
</script>