IgniteUI / igniteui-blazor

Ignite UI for Blazor component library packs 35+ native Blazor UI Controls with 60+ high-performance Charts designed for any Blazor WASM or Server-side app scenario.
https://www.infragistics.com/products/ignite-ui-blazor
3 stars 3 forks source link

Chart only works in App.razor and not on a page #75

Closed ZapRiver closed 1 year ago

ZapRiver commented 1 year ago

[Uploading InfragisticsChartTest2.zip…]()

Description

Your chart sample stacked-chart-types is on App.razor, which works fine. I'm trying to put it on its own page but it doesn't show anything. There are no error messages. The only place the chart works is when it's placed on App.razor.

Steps to reproduce

  1. Run the attached sample code.
  2. Go to the Counter page.

Result

The chart doesn't show on the screen.

Expected result

The chart should show and display some bar charts.

Attachments

Source code is attached.

ZapRiver commented 1 year ago

I forgot to say that not only the sample doesn't work except on App.razor but the chart component itself doesn't work except on App.razor.

ZapRiver commented 1 year ago

InfragisticsChartTest2.zip

agoldenbaum commented 1 year ago

Hi ZapRiver,

I have been investigating into the sample you have attached, and it appears that the chart is not showing up because of the 100% Height and Width applied to it. Percentage heights and widths are dependent on the parent element and the Height will default to 0. Looking at the "container vertical"

element in the Dev Tools of the browser, it appears to have zero height.

My best recommendation in this case would be to provide a style for "container vertical" that gives it a height / width. Alternatively, you can assign pixel values to the height / width of the chart to see it.

agoldenbaum commented 1 year ago

Marking this closed as this was an issue in the sample relating to the CSS used