Page 1 of 1

Gant chart dynamic height

Posted: Tue Apr 02, 2024 5:01 pm
by StimulsoftUser
We use a Gant chart. A single horizontal rectangle represents 2 time-related information and 1 category information. How to ensure automatic expansion of the chart vertically (with constant rectangle height) depending on the number of such rectangles.

Re: Gant chart dynamic height

Posted: Tue Apr 02, 2024 8:09 pm
by Lech Kulikowski
Hello,

Coul dyou explain your task in more details?

Thank you.

Re: Gant chart dynamic height

Posted: Wed Apr 03, 2024 7:15 am
by StimulsoftUser
Let's assume that we place a component on the page in the designer - a Gant chart with a height of 1/2 the height of the page. When generating a report, the chart receives data from the back-end (appropriate data source in the dictionary). If we get only 1 value from the backend, we will have 1 horizontal bar on the chart. If we get 5 values ​​from the backend, we will have 5 horizontal bars on the chart, but their height (thickness) will be smaller. In cases 1 and 2, the chart takes up 1/2 of the page. We want the height (thickness) of the horizontal bar to remain the same and the height of the chart to change, i.e. so that the chart can "grow" vertically, just like a table.

Re: Gant chart dynamic height

Posted: Wed Apr 03, 2024 6:51 pm
by Lech Kulikowski
Hello,

As a way, you can check count data and set the Height property of the Chart component in events.

Thank you.

Re: Gant chart dynamic height

Posted: Thu Apr 04, 2024 8:00 am
by StimulsoftUser
Hello. Thank you for your answer. Which viewer event would be most appropriate ? Is any event emitted after pressing the send button in the User Panel ?

Re: Gant chart dynamic height

Posted: Thu Apr 04, 2024 1:44 pm
by StimulsoftUser
Hello Lech,

Can placing a chart on a component that can expand vertically cause the chart to also grow in height ?

Re: Gant chart dynamic height

Posted: Sun Apr 07, 2024 7:13 pm
by Lech Kulikowski
Hello,

> Which viewer event would be most appropriate ? Is any event emitted after pressing the send button in the User Panel ?

For example, onInteraction event:
https://www.stimulsoft.com/en/documenta ... events.htm

> Can placing a chart on a component that can expand vertically cause the chart to also grow in height ?

No. The chart component has static height and width properties.

Thank you.