@abusedmedia
I tried to use CanvaJS to create a beautiful pyramid chart, it works on JSFiddle, but when I adapt the code to works with Retool Custom Component, nothing appear
You can see the JSFiddle just here : Setting Minimum Height (minHeight) for columns in Column Chart - CanvasJS JavaScript Charts - JSFiddle - Code Playground
something wrong here ?
<html>
<head>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script>
window.Retool.subscribe(function(model) {
var minValue = 500;
var ctx = document.getElementById('canvas').getContext('2d');
var chartData = [{
type: "pyramid",
toolTipContent: "{y}",
indexLabelFontColor: "#fff",
indexLabelFontSize: 16,
indexLabel: "{y}",
indexLabelPlacement: "inside",
dataPoints: [
{ y: 625, indexLabel: 'label1', color: 'red', indexLabelFontColor: 'red' },
{ y: 16, indexLabel: 'label2', color: 'blue', indexLabelFontColor: 'blue'},
{ y: 8, indexLabel: 'label3', color: 'yellow', indexLabelFontColor: 'yellow'},
{ y: 3, indexLabel: 'label4', color: 'black', indexLabelFontColor: 'black'}
]
}];
var chart = new CanvasJS.Chart("chartContainer", data : { chartData });
chart.render();
})
</script>
</head>
<body>
<div id="chartContainer" style="height: 360px; width: 100%;"></div>
</body>
</html>
Thanks for your help on this subject !