Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Visible Series in Chart
PostPosted: Tue Jan 14, 2014 2:40 am 

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

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

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



 Profile  
 
 Post subject: Re: Visible Series in Chart
PostPosted: Tue Jan 14, 2014 9:01 am 
User avatar

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

Offline
Yes, but you access via the Curves not Series.

like

Code:

// with name
Trend1.Curves["Curve 1"].IsVisible = false;

// or index

Trend1.Curves[0].IsVisible = false;



You can toggle them like this

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


 Profile  
 
 Post subject: Re: Visible Series in Chart
PostPosted: Thu Jan 16, 2014 4:12 am 

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

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

Attachment:
Axis parameters.jpg
Axis parameters.jpg [ 143.73 KiB | Viewed 4094 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


 Profile  
 
 Post subject: Re: Visible Series in Chart
PostPosted: Thu Jan 16, 2014 5:58 am 
User avatar

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

Offline
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


 Profile  
 
 Post subject: Re: Visible Series in Chart
PostPosted: Tue Jun 03, 2014 2:21 am 

Joined: Tue Nov 13, 2012 6:38 am
Posts: 1

Offline
old thread but...

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


 Profile  
 
 Post subject: Re: Visible Series in Chart
PostPosted: Thu Jun 05, 2014 12:48 am 

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

Offline
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


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron