A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
JohnCZ
Posts: 73 Joined: Wed Jun 27, 2012 1:17 am
Location: CZ
Contact:
Post
by JohnCZ » Tue Jan 14, 2014 2:40 am
Hi there,
I was wondering if it is possible to hide/visible the series in Chart Object.
I tried it with simple code but still is not working.
Code: Select all
if (Globals.Tags.Visible_Curve1.Value = 1)
{
Chart1.Series["Series"].Visible = true;
}
or
if (Globals.Tags.Visible_Curve1.Value = 1)
{
Chart1.Series["Series"].Enabled = true;
}
Edmund
Posts: 92 Joined: Thu Nov 29, 2012 2:27 pm
Post
by Edmund » Tue Jan 14, 2014 9:01 am
Yes, but you access via the Curves not Series.
like
Code: Select all
// with name
Trend1.Curves["Curve 1"].IsVisible = false;
// or index
Trend1.Curves[0].IsVisible = false;
You can toggle them like this
Code: Select all
void Button1_Click(System.Object sender, System.EventArgs e)
{
Trend1.Curves[0].IsVisible = !Trend1.Curves[0].IsVisible;
}
Best Regards
Edmund Andersson
AITECH AB
Part of Beijer Integrator Group
JohnCZ
Posts: 73 Joined: Wed Jun 27, 2012 1:17 am
Location: CZ
Contact:
Post
by JohnCZ » Thu Jan 16, 2014 4:12 am
Thanks Edmund,
I use this code for trend viewer. What I mean is that I have a chart graf (Chart types= line) not trend. This code is working for Trends.
Axis parameters.jpg (143.73 KiB) Viewed 13438 times
red arrow is symbol to show only red Series
blue arrow is symbol to show only blue series
If there were possibilty to have trend viewer not with time scale sou it will be possible but
Edmund
Posts: 92 Joined: Thu Nov 29, 2012 2:27 pm
Post
by Edmund » Thu Jan 16, 2014 5:58 am
Ahh Sorry JohanCZ, I missread you thread.
I havent realy used the chart tool so don´t know anything about it.
Edmund Andersson
AITECH AB
Part of Beijer Integrator Group
janerik
Posts: 1 Joined: Tue Nov 13, 2012 6:38 am
Post
by janerik » Tue Jun 03, 2014 2:21 am
old thread but...
Chart.Series["Series"].IsActive = false;
JohnCZ
Posts: 73 Joined: Wed Jun 27, 2012 1:17 am
Location: CZ
Contact:
Post
by JohnCZ » Thu Jun 05, 2014 12:48 am
Hi there,
Thanks I already used it as no-friendly solution. But customer doesn't wanted because the previous chart stay there. This script only active/inactiv the chart. He wants to have it as in trends, so we did three charts object and used tags to visible them.
Best regards
JohnCZ