Visible Series in Chart

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
JohnCZ
Posts: 73
Joined: Wed Jun 27, 2012 1:17 am
Location: CZ
Contact:

Visible Series in Chart

Post by JohnCZ »

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;
			}


User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Visible Series in Chart

Post by Edmund »

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:

Re: Visible Series in Chart

Post by JohnCZ »

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
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

User avatar
Edmund
Posts: 92
Joined: Thu Nov 29, 2012 2:27 pm

Re: Visible Series in Chart

Post by Edmund »

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

Re: Visible Series in Chart

Post by janerik »

old thread but...

Chart.Series["Series"].IsActive = false;

JohnCZ
Posts: 73
Joined: Wed Jun 27, 2012 1:17 am
Location: CZ
Contact:

Re: Visible Series in Chart

Post by JohnCZ »

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

Post Reply