Posted 18 November 2020, 6:56 pm EST
Hi
I have a export function to save the chart as an image.
Export:
function (pDivHost) {
var pChart = wijmo.Control.getControl(pDivHost);
if (pChart != null && pChart.hostElement != null)
pChart.saveImageToFile(pChart.hostElement.id + '.png');
},
First I create a bar chart and I am able to print it.
Then I display a Pie chart after calling these functions:
PieChart: function (pDivHost, pChart)
{
var pDivHostName = null;
pDivHostName = pDivHost.id;
while (pDivHost.children.length)
{
pDivHost.removeChild(pDivHost.children[0]);
}
pChart.dispose();
var VarPieChart = new wijmo.chart.FlexPie('#' + pDivHostName,
{
header: pChart.header,
itemsSource: pChart.itemsSource,
binding: 'value',
bindingName: 'name',
dataLabel:
{
position: wijmo.chart.PieLabelPosition.Radial,
content: "{value}"
},
});
}
But after displaying the Piechart when I call my export function the getControl method returns null.
What am I missing here?
Also chart interaction (zoom and pan) does not work with FlexPie.