Hi
I have the following code in a method that is executed when the window opens up, after calling an API:
<ejs-accumulationchart ....
:selectedDataIndexes="totalsSelected"
method() {
if (item != "test") {
this.totalsSelected = [{ series: 0, point: Object.keys(this.user.items).indexOf(this.user.item) }]; this.$refs.totalsChart.ej2Instances.refresh();
}
}
purpose: If the user selected a slice/item in a pie, went to a different screen and then comes back, I want the same selected slice/item to be re-selected. At the moment this code is executed anyway so my 1st question would be: How can I know if and what is the current selected slice of a pie?
Now for the errors, though I'm not sure they are related to the above (I think it is):
I see the following error in the console, which is coming from selection.js: Uncaught TypeError: Cannot read property 'point' of undefined
AccumulationSelection.prototype.removeStyles = function (elements, index) {
var accumulationTooltip = this.control.accumulationTooltipModule;
var legendShape;
for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
var element = elements_2[_i];
if (element) {
if (this.control.accumulationLegendModule && this.control.legendSettings.visible) {
legendShape = document.getElementById(this.control.element.id + '_chart_legend_shape_' + index.point);
this.removeSvgClass(legendShape, this.getSelectionClass(legendShape.id));
}
var opacity = accumulationTooltip && (accumulationTooltip.previousPoints[0].point.index === index.point) ?
accumulationTooltip.svgTooltip.opacity : this.series[index.series].opacity;
element.setAttribute('opacity', opacity.toString());
this.removeSvgClass(element, this.getSelectionClass(element.id));
}
}
};
The problem: accumulationTooltip.previousPoints is 0 length so the above throws an error. I don't know what previousPoints represents.
I see the following error in the console which is coming from accumulation-base.js: Error: <text> attribute transform: Expected transform function, "translate(0, 0)undefined".
AccumulationBase.prototype.setElementTransform = function (id, position) {
var element = getElement(id);
if (element) {
element.setAttribute('transform', position); <<<<< the error is coming from this line
}
};
Please advice
Thanks