Update ChartPrimaryXAxis properties

Hello,

I have a Chart with defined ChartPrimaryXAxis for it. I would like to be able to update ChartPrimaryXAxis's Title or ValueType for already created chart. I prepared an example application so you can better understand my aim an my approach.

Best regards,
Volodymyr

Attachment: ChartExample_82b096af.7z

3 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team March 31, 2021 12:49 PM UTC

Hi Vladimir, 
 
Greetings from Syncfusion. 
 
We have ensured your reported scenario with attached sample. We suggest you to update the chart title and its value type using property binding. In button click we have changed double valuetype to category type. We have attached modified sample for your reference. 
 
@code{ 
    public string title = "Axis Title"; 
    public string X = "X1"; 
    Syncfusion.Blazor.Charts.ValueType xValueType = Syncfusion.Blazor.Charts.ValueType.Double; 
    private void UpdateAxisTitle() 
    { 
        title = "Updated Title"; 
        xValueType = Syncfusion.Blazor.Charts.ValueType.Category; 
        X = "X2"; 
        Chart.Refresh(); 
    } 
 
Screenshots 
 
Before Update 
 
 
After Update 
 
 
Sample 
 
Please revert us if you have any concerns. 
 
Regards, 
Durga G 


Marked as answer

VM Vladimir Melnik March 31, 2021 01:41 PM UTC

Hello Durga,

thanks for your reply. Is there any possibility to achieve same behavior without binding?


DG Durga Gopalakrishnan Syncfusion Team April 1, 2021 03:54 PM UTC

Hi Vladimir,

 

As of now, we don’t have other option to update the chart properties. We suggest you to update using property binding. Please let us know if you have any concerns.

 

Regards,

Durga G


Loader.
Up arrow icon