Hi,
There is a different component for a 3d chart. Here is how to initialize it:
<script>
const data = [
{ Month: 'January', Sales: 30, Revenue: 200 },
{ Month: 'February', Sales: 40, Revenue: 220 },
{ Month: 'March', Sales: 50, Revenue: 250 },
{ Month: 'April', Sales: 70, Revenue: 300 },
{ Month: 'May', Sales: 60, Revenue: 280 }
];
Smart('#chart', class {
get properties() {
return {
caption: "3D Sales Chart",
description: "Monthly Sales Data in 3D",
showLegend: true,
dataSource: data,
xAxis: {
dataField: 'Month'
},
valueAxis: {
unitInterval: 20,
title: { text: 'Values' }
},
seriesGroups: [
{
type: 'column', // 3D column
series: [
{ dataField: 'Sales', displayText: 'Sales' },
{ dataField: 'Revenue', displayText: 'Revenue' }
]
}
]
}
}
});
</script>
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/