Hello,
we are using the following HTML to display a chart
<ej-chart size.width="960px"
id="chartcontainer"
#chartcontainer
[enableCanvasRendering]="true"
(seriesRegionClick)="chartSeriesSelected($event)">
<e-seriescollection>
<e-series type="column"
[marker.dataLabel.visible]="true"
fill="#E94649"
[enableAnimation]="true"
[selectionSettings]="{ enable:'true',
mode: 'point', pattern:'chessboard'
}"
[dataSource]="source"
xName="x"
yName="y">
</e-series>
</e-seriescollection>
</ej-chart>
The chart renders as expected and we are able to select
individual elements of the series.
Depending on the selection we re-calculate values to
visualize a percentaged comparision. To update the chart we are using the
method this.chart.widget.redraw() which is
working as well.
Our problem is that the selection is lost after calling
redraw and we found no way to „re-select“ the specific element. As we want to
export the calculated values as an image it is important to us that the
selection is still visible. Otherwise it is not obvious on which basis the
calculation was done.
Is there any way to keep the selection or to set the
selection via code?
Thanks for your help.
Query |
Response | |
Our problem is that the selection is lost after calling redraw and we found no way to „re-select“ the specific element |
We have tried to replicate the reported scenario with respect to your code snippet, but chart maintains the selection state on redraw. To ensure this we have created a sample, in which on button click we have changed the fill color of the series and call the redraw method. Sample used for testing can be find from bellow link.
Code snippet:
Screenshot before redraw:
Screenshot after redraw:
We would also like to let you know that from version 13.4.0.53, this selection is working properly (maintain the state on redraw). Since we are not aware of your exact scenario on which the issue is reproduced, we would like to let you know the following details, which will be helpful in further analysis and provide you the solution sooner.
· Modify the attached sample or provide your sample with replication steps.
· Current version of Essential Studio you are using.
· Browser with version in which the issue is reproduced.
· Do you have used any CSS for chart series.
| |
As we want to export the calculated values as an image it is important to us that the selection is still visible |
Currently we don’t have support exporting chart with the another element, so we have already logged feature request for this requirement and this will be available in any of our upcoming release. And also we have created branch incident under your account, for further updates on this query, kindly follow up with the branch incident. |