ant-design-blazor / ant-design-blazor/ant-design-charts-blazor

Create chart-config at runtime does not work!

Aberta
#52 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C#
Estrelas
186
Forks
44
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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](https://user-images.githubusercontent.com/45635963/118956185-ab2fcb80-b95f-11eb-8086-8e9e11489bb0.png)
.
.
.
**2 .**
Then I create config at runtime in a function:

![image](https://user-images.githubusercontent.com/45635963/118955531-10cf8800-b95f-11eb-8352-122736bf8815.png)

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](https://user-images.githubusercontent.com/45635963/118955908-6d32a780-b95f-11eb-9c1c-e1c69f25c4eb.png)

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.