[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

Highlighting a AdvancedDataGrid Row when corresponding point clicked on PlotChart

Asked by glg3 in Adobe Flex, ActionScript

Tags: Flex 3, Advanced DataGrid, ArrayCollection, PlotChart

I'm pulling my hair out on this one...
I've got a plot chart and an advanced datagrid both supplied by the same dataProvider - an arraycollection.  My goal is to have the row in the adg highlight when a point is clicked in the plotchart and visaversa - the point hightlight when the row is clicked...

At this point I'm focusing on the plotchart click with the row highlight.  I've tried a number of solutions - and have gotten some interesting results, but not what I want..

The code below ends up highlighting all rows, and interestingly, when I mouse over the rows - they are unhighlighted.  Clicking on the plotchart points does nothing...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
[Bindable]
var selectedChartData:Object = new Object();
 
private function handleChange(event:Event):void {
			
				selectedChartData = plotchart3.selectedChartItem;
				Alert.show(selectedChartData.index);  //this shows the appropriate index
				
				
			}
			private function myStyleFunction(data:Object, col:AdvancedDataGridColumn):Object {
				
				if (data.rowIndex == selectedChartData.index)
				
				return {color:0xFF0000, fontWeight:'bold'};
				return null;
			
			}
 
						<mx:PlotChart id="plotchart3"
									  height="100%"
									  width="382"
									  selectionMode="single"
									  change="handleChange(event)">
							<mx:horizontalAxis>
								<mx:LinearAxis title="Year"
											   minimum="1955"
											   maximum="1985"/>
							</mx:horizontalAxis>
							<mx:verticalAxis>
								<mx:LinearAxis title="Total Time"/>
							</mx:verticalAxis>
							<mx:series>
								<mx:PlotSeries displayName="Total Time"
											   dataProvider="{newSelectedItemsAC}"
											   id="series2"
											   xField="Year"
											   yField="Total_Time"
											   itemRenderer="mx.charts.renderers.CircleItemRenderer"
											   radius="3"/>
							</mx:series>
 
						</mx:PlotChart>
						<mx:AdvancedDataGrid id="graph1_AC"
											 dataProvider="{newSelectedItemsAC}"
											 designViewDataType="flat"
											 width="381"
											 height="100%"
											 itemClick="itemClickEvent(event);"
											 styleFunction="myStyleFunction">
							<mx:columns>
								<mx:AdvancedDataGridColumn dataField="Year"
														   headerText="Year"/>
								<mx:AdvancedDataGridColumn dataField="Town"
														   headerText="Town"/>
								<mx:AdvancedDataGridColumn dataField="Field"
														   headerText="Field"/>
								<!--mx:AdvancedDataGridColumn dataField="OCR_Elem_count" headerText="Elem Count"/>
									 <mx:AdvancedDataGridColumn dataField="OCR_Accuracy" headerText="OCR Accuracy"/>
									 <mx:AdvancedDataGridColumn dataField="OCR_Elem_Accuracy" headerText="Elem Accuracy"/-->
								<mx:AdvancedDataGridColumn dataField="Total_Time"
														   headerText="Total Time"/>
							</mx:columns>
						</mx:AdvancedDataGrid>
[+][-]10/12/09 06:52 PM, ID: 25556437Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Adobe Flex, ActionScript
Tags: Flex 3, Advanced DataGrid, ArrayCollection, PlotChart
Sign Up Now!
Solution Provided By: glg3
Participating Experts: 0
Solution Grade: A
 
[+][-]10/10/09 06:58 PM, ID: 25544631Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/10/09 07:47 PM, ID: 25544713Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625