ant-design-charts-blazor icon indicating copy to clipboard operation
ant-design-charts-blazor copied to clipboard

Create chart-config at runtime does not work!

Open true-perfect-code opened this issue 4 years ago • 0 comments

Hi Ant-Community,

Background: I use the same page for the display of charts, but pass a parameter that processes the data per department. To make it visible on the report which department it is, the title of the chart has to be set dynamically after loading the page. However, I cannot do this the way it is indicated in Ant examples, but I have to define the config at a later time (preferably in a method) and compose titles dynamically there.

1 . So, to set chart titles dynamically, I define first the config:

Definition image . . . 2 . Then I create config at runtime in a function:

image

Title is then displayed, but its content remains unchanged (so chart is not updated when a date range changes)!

If I define configutration statically again (like in your examples), everything works fine.

image

The problem here is that I can only define titles once and it always stays the same for the whole time!

Is this an error in the chart component or is there another way to set the title dynamically?

Thanks

true-perfect-code avatar May 20 '21 09:05 true-perfect-code