-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LineChart inside a GridDetailView #908
Comments
@ymoona Thank you for using BlazorBootstrap. I'll check this scenario and get back to you. |
@gvreddy04 I spend a bit more time this morning trying to figure out what is going on, and I found why it won't work. I fix that by referencing from a dictionary based on the key. Then I had the issue that I could the right moment to initialize the chart as "OnAfterRenderAsync" is too early (not sure why, but it does not work). So I now do that on the OnRowClick, that fires anyway when GridDetailView is requested by the user.
What are your thoughts on this implementation? |
Describe the bug
I have a LineChart that I would like to show in the GridDetailView of a Grid.
When placing this LineChart just above the grid (with some test data) it is rendered just fine.
But placing the LineChart inside GridDetailView it does not render, and the area stays blank.
The code is based on this example.
Versions (please complete the following information):
Sample code
Sample code to reproduce the issue.
<GridDetailView TItem="TheObject"> <Button Type="ButtonType.Button" Class="mb-2" Color="ButtonColor.Primary" Size="ButtonSize.Small" @onclick="async () => await Init()"> Init </Button> <Button Type="ButtonType.Button" Class="mb-2" Color="ButtonColor.Primary" Size="ButtonSize.Small" @onclick="async () => await Update()"> Update </Button> <LineChart @ref="lineChart" Width="800" Class="mb-4" /> </GridDetailView>
I based the code on this example:
https://demos.blazorbootstrap.com/charts/line-chart#how-it-works
GitHub repo
GitHub repo with minimal code to reproduce the issue.
Desktop (please complete the following information):
Additional context
Is what I am trying supported? I was expecting the rendering issue to be in the initialization, so I created button to init and update the LineChart. They work fine when the LineChart is rendered outside the Grid.
The text was updated successfully, but these errors were encountered: