Hide charts if missing data source

Stimulsoft Dashboards.JS discussion
Post Reply
todea.df@gmail.com
Posts: 17
Joined: Tue Sep 01, 2020 8:45 am

Hide charts if missing data source

Post by todea.df@gmail.com »

Hello,

I attached a .mrt file that contains 2 csv data-sources used for 2 charts.
The question is: how to hide a chart if the corresponding data source is missing? Also, the empty space of the hidden chart to be filled in by the charts below (shift up).

I managed to hide a chart if the csv did not contain data by using a condition, but this is not the desired case.

I attached 2 images to showcase the desired behaviour.
Please note that I am using the Angular version of the Stimulsoft Dashboards.JS Designer.

Thanks,
Darius
Attachments
hide-charts.mrt
(14.06 KiB) Downloaded 188 times
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide charts if missing data source

Post by Lech Kulikowski »

Hello,

Please place Chart components on the DataBand and set the CanShrink=true property.
To hide, you can add Condition in which check count datasource.Count and use "Component Is Enabled" option.

Thank you.
todea.df@gmail.com
Posts: 17
Joined: Tue Sep 01, 2020 8:45 am

Re: Hide charts if missing data source

Post by todea.df@gmail.com »

Hello,

Could you please show me one .mrt example starting from the hide-charts.mrt attached above?

I don't manage to create a correct Condition.
Who is "datasource"? The data-source name or the resource name from the data-source? The expression "{bar.Count > 0}" should be ok?

Thanks a lot!
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Hide charts if missing data source

Post by Lech Kulikowski »

Hello,

The screenshot in the attahcment.

Thank you.
Attachments
Annotation 2020-09-06 205108.png
Annotation 2020-09-06 205108.png (186.09 KiB) Viewed 2662 times
Post Reply