#104305
pkz
Blocked

Hi,

 

Thank you again for the help! Everything is perfect now!

One small question: Is it possible to change the pivot-chart type dynamically?

 



window.Smart(
"#pivot-chart",
class {
get properties() {
return {
caption: "",
description: "",
xAxis: {
dataField: "country",
gridLines: {
visible: false
},
type: "basic"
},
colorScheme: "scheme28",
seriesGroups: [
{
type: "column",
columnsGapPercent: 50,
seriesGapPercent: 0,
valueAxis: {
description: "Revenue",
axisSize: "auto"
},
series: []
}
]
};
}
}
);

This is used in the pivot group charting. What if I wanted to dynamically have buttons like line, bar, chart etc.? does it involve changing the data again? or is there a way to pass a parameter to the smart-chart

i.e: document.querySelector("smart-chart").dataSource = chartDataSource; so that we can easily switch from line or bar?

 

Thanks again for all your help! Really liking using the library so far!