Page 1 of 2
How to hide a series at runtime
Posted: Tue Feb 16, 2010 3:25 am
by unison
Good day,
Is it possible to hide a series at runtime?
For example, I have a chart with 5 different series. At times, some of those series can be empty, and I wish to hide that series on the graph and legend. Is this possible?
Regards,
David
How to hide a series at runtime
Posted: Tue Feb 16, 2010 8:00 am
by Andrew
Hello,
You may process the BeforePrintEvent in what the elements of diagram are allowed to be deleted:
if (MyCondition)
{
Chart1.Series.RemoveAt(index);
}
Thank you.
Re: How to hide a series at runtime
Posted: Wed Aug 13, 2014 6:14 am
by AliVa
Hi Andrew,
I put chart in the data band and wants to hide/un-hide series based on the data. so I can see multiple charts for each record.
I put "Chart1.Series.RemoveAt(index)" in " Chart Beforeprint event" and it is working for the first record. but it will remove that series for the rest of the report.
Question is how can I un-hide a series? is there any property like "Enabled" for series which can dynamically set to "true" or "false"?
Regards,
Ali
Re: How to hide a series at runtime
Posted: Wed Aug 13, 2014 12:06 pm
by HighAley
Hello.
Sorry, maybe we don't understand your question.
Please, describe your problem more detailed with samples.
Thank you.
Re: How to hide a series at runtime
Posted: Fri Aug 29, 2014 1:26 am
by AliVa
Hi Aleksey,
The report which I build has a databand and in this databand there is a multi series chart. Databand related to the "Master Datasource" and chart attached to "Detail data source" and by using chart condition field, I filter detail_datasource by Master_datasource data.
it is working properly.
now I have a request that in the chart, based on Master_data, just a collection of series become visible and the rest turns to disable.
for example if user wants to see "running total area chart", there is a Boolean field. based on this Boolean field I want to make an area series in the chart enable/disable.
does it make sense now?
the issue that I have with Chart1.Series.RemoveAt is if for one of the first rows, the value of the Boolean field is "false" it will work and remove the series, but if the same value is true for the next rows, the series doesn't show up (as it was removed from the chart)
hope it become more clear now.
Regards,
Ali
Re: How to hide a series at runtime
Posted: Fri Aug 29, 2014 1:08 pm
by HighAley
Hello, Ali.
Unfortunately, it's impossible to hide series. But you could use Filter property of the chart to hide unnecessary series.
Thank you.
Re: How to hide a series at runtime
Posted: Mon Sep 15, 2014 4:58 am
by AliVa
Hello Aleksey,
Thanks for the replay. Filter almost did the job, however there is an issue whenever number of filters in one report is more than 6 or 7. report will break with "Problem when parsing Chart Argument".
is there a problem or limitation regarding number of filters in a report? Please LMK.
Thanks again for your help.
Regards,
Ali
Re: How to hide a series at runtime
Posted: Mon Sep 15, 2014 6:01 am
by Alex K.
Hello,
Can you please send us your report with test data which reproduce the issue for analysis.
Thank you.
Re: How to hide a series at runtime
Posted: Mon Sep 15, 2014 7:53 am
by AliVa
Hi Aleksey,
it is hard to send you the report. because datasources are dynamically created. is it enough if I send you just the report file? it cant be previewed.
if it is ok, please give me your email address and I will send it for you. because of copy right and privacy issue, I can not put it in the forum.
Regards,
Ali
Re: How to hide a series at runtime
Posted: Mon Sep 15, 2014 11:29 am
by Alex K.
Hello,
Please send us your report on
support@stimulsoft.com
Thank you.