Solved

Flex Databind to Lineseries

Posted on 2009-05-06
4
451 Views
Last Modified: 2012-05-06
I'm creating lineseries using below code
var myLineSeries:LineSeries = new LineSeries();
myLineSeries.visible = allSegmentChartsOn;

I want the visible should be driven from allSegmentChartsOn boolean which is bindiable variable.
defined as :
[Bindable] private var allSegmentChartsOn:Boolean=true;

is there anyway I need to do in order the visibility should be changed as we change allSegmentChartsOn  variable in the code?
[Bindable] private var allSegmentChartsOn:Boolean=true;

var myLineSeries:LineSeries = new LineSeries();

myLineSeries.visible = allSegmentChartsOn;

Open in new window

0
Comment
Question by:SimonHowald
  • 2
  • 2
4 Comments
 

Author Comment

by:SimonHowald
Comment Utility
any one?
0
 
LVL 37

Accepted Solution

by:
zzynx earned 500 total points
Comment Utility
private var allSegmentChartsOn:Boolean=true;

[Bindable]      
public function set segmentChartsOn(value:Boolean):void {
   allSegmentChartsOn = value;
}
public function get segmentChartsOn():Boolean {
   return allSegmentChartsOn;
}

var myLineSeries:LineSeries = new LineSeries();
myLineSeries.visible = allSegmentChartsOn;

>> is there anyway I need to do in order the visibility should be changed as we change allSegmentChartsOn  variable in the code?
// Yes. This line takes care of that:

BindingUtils.bindProperty(myLineSeries, "visible", this, "segmentChartsOn");

The above line adapts the "visible" property of myLineSeries whenever the "segmentChartsOn" property of 'this' changes.
0
 

Author Closing Comment

by:SimonHowald
Comment Utility
You are a real Flex master!

Thanks!
0
 
LVL 37

Expert Comment

by:zzynx
Comment Utility
Thanx 4 axxepting
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
website content maintenance 3 55
Mobile or not?? 4 46
razorCMS: Change Menu Font 4 22
increase words that display in widget 6 5
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now