Unwire pivotgrid from chartcontrol
Hi,
After wiring a pivot grid to a chart (helper.WireGrid(this.pivotGridControl1, this.chartControl1), is it then possible to unwire the chart and keep its current data intact?
Thanks.
SIGN IN To post a reply.
7 Replies
DK
Dineshraj Kumar
Syncfusion Team
June 4, 2018 01:14 PM UTC
Hi Travis,
Currently we have provided the support only to wire the PivotGrid control to a chart based on the selected ranges in PivotGrid. Once the cell values are selected in PivotGrid control, they will be rendered in a chart control at runtime. As cell selection is changed dynamically, it is not feasible to unwire the chart from the PivotGrid control.
Regards,
Dineshraj K.
TC
Travis Chambers
June 5, 2018 01:56 PM UTC
Thank you for your feedback! That is a bit disappointing to hear but I have come up with sort of a workaround. That being said, each time you select a range and it is wired to a chart the chart reverts back to the default styling. Is there any way to persist the chart's visual styles so that the wiring of the grid does not change them?
Thanks!
TC
Travis Chambers
June 5, 2018 05:10 PM UTC
Also, is it possible to wire the pivotGridControl to a regular gridControl as well? If not, is there a recommended way to get the selected range PLUS the corresponding headers into a datatable (or other method) to then load a gridControl?
Thanks!
SR
Sabaridass Ramamoorthy
Syncfusion Team
June 6, 2018 01:04 PM UTC
Hi Travis,
Please find our response below.
|
Query |
Response | ||
|
That being said, each time you select a range and it is wired to a chart the chart reverts back to the default styling. Is there any way to persist the chart's visual styles so that the wiring of the grid does not change them? |
We have provided the workaround to achieve your requirement – “Prevent updating the chart values once the grid was unwired” in application level. We have maintained the chart values based on the old selected ranges if the grid was unwired.
Please refer to the code example below.
| ||
|
Also, is it possible to wire the pivotGridControl to a regular gridControl as well? If not, is there a recommended way to get the selected range PLUS the corresponding headers into a datatable (or other method) to then load a gridControl? |
Currently we don’t have any existing way to wire the PivotGrid control into basic grid control. Hence we have provided the work around to wire the PivotGrid control into SfDataGrid control. In this solution we have found the raw items from the selected ranges and then provided them to the ItemsSource of SfDataGrid.
Please refer to the code example below.
|
Please find our working sample from the following location:
Regards,
Sabaridass R
TC
Travis Chambers
June 7, 2018 05:28 PM UTC
Thank you for your response. I haven't yet tried the response for the 2nd query, however the first response doesn't match the first query. I don't need a work around to unwiring the charts from the grid as I already came up with a work around for that.
The issue is with visual styles. While certain visual styles (i.e. default skins and color pallets) will persist fine when the chart is wired, others (namely the individual series colors and types) do not persist.
For example, if I wire a chart to a pivot grid and I right click on the first series colored symbol in the legend and use the context menu to change the color and then also change it to the type of Scatter so that I have a combo chart with two series (scatter and column) the next time I drag a new range the scatter reverts back to column and the series colors revert back to purple and green. Even deserializing the chart when saved as a combo chart does not change the series chart types like it should as if wiring the chart is only compatible with columns.
Ultimately, I need the wiring of the chart to not reset any visual styles / properties of the chart.
TC
Travis Chambers
June 8, 2018 08:24 PM UTC
I think it may be simplest to load the selected range directly to the chart via a button click, so that visual styles are not impacted, only the data. What is the best way to bind the chartcontrol with the selected range in code?
I tried to convert the selected range to a datatable and then attach the datatable to the chart but I've run into several problems, especially with the column and row indexes of the selected range being dynamic numbers which throws off the loops.
Thanks.
JB
John Bowlin Bosco Kasiraman
Syncfusion Team
June 14, 2018 11:57 AM UTC
Hi Travis,
We have validated your query, and we are considering this as an improvement
“Support to persist the chart types and chart series while selecting the cells
in pivotgrid” in our control. Meanwhile a support incident has been created
under your account and we request you to login into our Direct Trac system for
further updates on this improvement. Our Direct Trac support system can be
accessed from the following link:
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Pauline Bosco K
SIGN IN To post a reply.
- 7 Replies
- 4 Participants
-
TC Travis Chambers
- Jun 1, 2018 06:44 PM UTC
- Jun 14, 2018 11:57 AM UTC