Problem on render two charts on a switch property

Hi Guys, I'm having a trouble trying to render two separate graphs on a SfSwtich.

Let me explain better:

I have a switch, that the user can choose what chart he like to see.

One of the charts, is a SfAccumulationChart, and he have the property of AccumulationChartTooltipSettings.

So, when i pass the mouse on the chart, and activate the property of tooltip enable=true, its ok, i see what have on the tooltip, but when wait like 10 seconds and press the switch to visualize the other chart, my application brokes.

The problem is on the Property name Enable.

I try a lot of things, like add a validation on switch, and if it's pressed, i have a stateHasChange(), i trying to invokeAsync(stateHasChange), but nothing of this works.

My question is, i'm doing something wrong, or the problem really exists?

Check my code:

Switch:

    <div class="col-lg-12 control-section">

        <div class="content-wrapper">

            <div class="container switch-control">

                <div>

                    <label style="padding: 10px 24px 10px 0">Graphics</label>

                    <SfSwitch TChecked="bool" Value="PieGraphic"></SfSwitch>

                </div>

            </div>

        </div>

    </div>


 My First Graphic: (I don't put all of the method, because is my company code, but only to imagine what's going on, same for other chart) 

    @if (! PieGraphic )

    {

        <SfDataManager Url="https://mvc.syncfusion.com/Services/Northwnd.svc/Tasks"></SfDataManager>

        </SfChart>

    }


My Second Graphic(problem):

    @if (GraficoPie)

    {

        <SfDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Orders" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>

        <SfAccumulationChart Title="Statics of the Graph's" EnableAnimation="false" Theme="Theme.Tailwind">

            <AccumulationChartTooltipSettings Enable="true"></AccumulationChartTooltipSettings>

        </SfAccumulationChart>

    }


When i comment the line of  AccumulationChartTooltipSettings , it's alright, i don't have the problem.

But if i use this property of the tooltip enable=true, and wait like 10 seconds, use the switch to see the other graphic, the error occours


3 Replies

DG Durga Gopalakrishnan Syncfusion Team August 27, 2021 02:35 PM UTC

Hi Rodrigo, 

Greetings from Syncfusion. 

We have ensured your reported scenario with specified snippet. We have facing the below console error while rendering accumulation chart after checking the switch button. In the sample, at initial rendering that is when switch is unchecked, we have rendered cartesian chart and when switch is checked, accumulation chart is rendered.  

 

Please confirm us whether you have also faced the same issue as above, so that we can proceed further and provide you the solution. If not, please try to replicate an issue in below sample or share us issue reproduced sample to validate this case from our end. 


Kindly revert us if you have any concerns. 

Regards, 
Durga G 



RB Rodrigo Bernardi August 30, 2021 12:23 PM UTC


teste.jpeg 




DG Durga Gopalakrishnan Syncfusion Team August 31, 2021 04:02 PM UTC

Hi Rodrigo, 

We have checked the shared sample and it is running fine from our end. Is it possible to ensure from your end with the snippet available in Index.razor file to replicate an issue? Please confirm us whether you have faced same issue as mentioned, based on your confirmation, we will log bug task and proceed further. 

Please let us know if you have any concerns. 

Regards, 
Durga G 


Loader.
Up arrow icon