Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git-svn-id: https://flexapps.svn.sourceforge.net/svnroot/flexapps/cen…

…sus2@622 381d3abc-5231-0410-a0e4-b068e20cbb11
  • Loading branch information...
commit 0954324ab8fd9a99abe1eaf5b1de06d34512d985 1 parent 2ee76a1
jlward4 authored
View
16 client/.actionScriptProperties
@@ -1,10 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties mainApplicationPath="census2.mxml" version="3">
- <compiler additionalCompilerArguments="-locale en_US" copyDependentFiles="true" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="false" outputFolderLocation="/home/jamesw/projects/census2/server/WebContent" outputFolderPath="bin-debug" rootURL="http://localhost:8080/census2/index.html?" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -licenses.license flexbuilder3 137740017147979634978523" copyDependentFiles="true" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="false" outputFolderLocation="/home/jamesw/projects/census2/server/WebContent" outputFolderPath="bin-debug" rootURL="http://localhost:8080/census2/index.html?" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="3">
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/player/9/playerglobal.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="4" path="">
+ <modifiedEntries>
+ <libraryPathEntry index="4" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/rpc.swc" useDefaultLinkType="false">
+ <crossDomainRsls>
+ <crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="rpc_3.5.0.12683.swz"/>
+ <crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="rpc_3.5.0.12683.swf"/>
+ </crossDomainRsls>
+ </libraryPathEntry>
+ <libraryPathEntry kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/datavisualization.swc" useDefaultLinkType="true">
+ <crossDomainRsls>
+ <crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="datavisualization_3.5.0.12683.swz"/>
+ <crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="datavisualization_3.5.0.12683.swf"/>
+ </crossDomainRsls>
+ </libraryPathEntry>
+ </modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="2" path="${PROJECT_FRAMEWORKS}/libs/player/{targetPlayerMajorVersion}/playerglobal.swc" useDefaultLinkType="false"/>
</excludedEntries>
View
3  client/.settings/com.adobe.flexbuilder.project.prefs
@@ -0,0 +1,3 @@
+#Tue Nov 17 20:44:02 MST 2009
+eclipse.preferences.version=1
+upgradeSDK/fb253292=
View
69 client/src/census2.mxml
@@ -15,12 +15,17 @@
import mx.events.StyleEvent;
import mx.utils.ObjectUtil;
import mx.controls.Alert;
+
+ [Bindable]
+ private var chartArrayCollection:ArrayCollection = new ArrayCollection();
private function changeTheme(theme:String):void
{
currentTheme = theme;
var eventDispatcher:IEventDispatcher = StyleManager.loadStyleDeclarations(currentTheme + ".swf");
eventDispatcher.addEventListener(StyleEvent.COMPLETE, function(event:StyleEvent):void {
+
+
if (!visible)
{
visible = true;
@@ -88,9 +93,42 @@
private function updateCharts():void
{
- recordsPerSecondChartView.dataProvider = results;
- transferSizeChartView.dataProvider = results;
- clientSideMemoryChartView.dataProvider = results;
+ for each (var item:Object in results)
+ {
+ updateChartDataProviderItem(item);
+ }
+ }
+
+ private function updateChartDataProviderItem(item:Object):void
+ {
+ var recordExists:Boolean = false;
+ for each (var chartItem:Object in chartArrayCollection)
+ {
+ if (item.id == chartItem.id)
+ {
+ recordExists = true;
+
+ updateChartItem(chartItem, item);
+
+ break;
+ }
+ }
+
+ if (!recordExists)
+ {
+ chartArrayCollection.addItem({id: item.id});
+ updateChartDataProviderItem(item);
+ }
+ }
+
+ private function updateChartItem(chartItem:Object, item:Object):void
+ {
+ for (var k:String in item)
+ {
+ chartItem[k] = item[k];
+ }
+
+ chartArrayCollection.itemUpdated(chartItem);
}
private function startTest(test:Object):void
@@ -143,8 +181,6 @@
<census2:ChannelConfig id="channelConfig">
<census2:message>
- trace("testId = " + event.message.body.testId + " resultType = " + event.message.body.resultType + " resultData = " + event.message.body.resultData);
-
updateResult(event.message.body.testId, event.message.body.resultType, new Number(event.message.body.resultData));
</census2:message>
</census2:ChannelConfig>
@@ -152,11 +188,6 @@
<mx:HTTPService id="srv" url="tests.xml">
<mx:result>
tests = event.result.tests.test;
-
- for each (var test:Object in tests)
- {
- resetResults(test);
- }
</mx:result>
</mx:HTTPService>
@@ -176,13 +207,13 @@
enabled="{testList.selectedItem != null}" useHandCursor="{testList.selectedItem != null}" buttonMode="true"
paddingLeft="6" toolTip="Select a test to run">
<mx:click>
- resetResults(testList.selectedItem);
- startTest(testList.selectedItem);
+ resetResults(testList.selectedItem);
+ startTest(testList.selectedItem);
</mx:click>
</mx:Button>
</mx:HBox>
<mx:Spacer height="10"/>
- <mx:List id="testList" width="90%" height="100%" dataProvider="{tests}" styleName="leftInnerContainer">
+ <mx:List id="testList" width="90%" height="100%" dataProvider="{tests}" styleName="leftInnerContainer" doubleClickEnabled="true">
<mx:itemRenderer>
<mx:Component>
<mx:HBox paddingTop="0" paddingBottom="0" verticalScrollPolicy="off" horizontalScrollPolicy="off"
@@ -192,6 +223,10 @@
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
+ <mx:itemDoubleClick>
+ resetResults(testList.selectedItem);
+ startTest(testList.selectedItem);
+ </mx:itemDoubleClick>
</mx:List>
<mx:Spacer height="10"/>
<controls:LabelLink>
@@ -206,7 +241,7 @@
<mx:TabBar id="tabBar" width="100%" selectedIndex="0" horizontalGap="2" top="0">
<mx:dataProvider>
<mx:String>Intro Video</mx:String>
- <mx:String>Rows / Second</mx:String>
+ <mx:String>Performance</mx:String>
<mx:String>Transfer Size</mx:String>
<mx:String>Client-side Memory</mx:String>
</mx:dataProvider>
@@ -231,9 +266,9 @@
<mx:Canvas width="100%" height="100%">
</mx:Canvas>
- <views:RecordsPerSecondChartView id="recordsPerSecondChartView" width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"/>
- <views:TransferSizeChartView id="transferSizeChartView" width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"/>
- <views:ClientSideMemoryChartView id="clientSideMemoryChartView" width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"/>
+ <views:RecordsPerSecondChartView id="recordsPerSecondChartView" width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" dataProvider="{chartArrayCollection}"/>
+ <views:TransferSizeChartView id="transferSizeChartView" width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" dataProvider="{chartArrayCollection}"/>
+ <views:ClientSideMemoryChartView id="clientSideMemoryChartView" width="100%" height="100%" paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10" dataProvider="{chartArrayCollection}"/>
</mx:ViewStack>
<mx:HRule id="leftSideBorder" styleName="tabDivider" y="{tabBar.height - 3}" x="1"/>
<mx:HRule id="rightSideBorder" styleName="tabDivider" y="{tabBar.height - 3}"/>
View
58 ...amesward/census2/views/BarItemRenderer.as → ...mesward/census2/charts/BarItemRenderer.as
@@ -16,18 +16,19 @@ You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-package org.jamesward.census.views
+package com.jamesward.census2.charts
{
import flash.display.Graphics;
import flash.geom.Rectangle;
+
import mx.charts.ChartItem;
import mx.charts.chartClasses.GraphicsUtilities;
+import mx.charts.series.items.BarSeriesItem;
import mx.core.IDataRenderer;
import mx.graphics.IFill;
import mx.graphics.IStroke;
import mx.skins.ProgrammaticSkin;
-import mx.charts.series.items.BarSeriesItem;
public class BarItemRenderer extends ProgrammaticSkin implements IDataRenderer
{
@@ -58,53 +59,50 @@ public class BarItemRenderer extends ProgrammaticSkin implements IDataRenderer
super.updateDisplayList(unscaledWidth, unscaledHeight);
var fill:IFill = GraphicsUtilities.fillFromStyle(getStyle("fill"));
- var stroke:IStroke = getStyle("stroke");
-
- var w:Number = stroke ? stroke.weight / 2 : 0;
-
- var modifiedHeight:Number = height - 2 * w;
-
+
var s:Number = 1;
if (_data is BarSeriesItem)
{
- if (_data.item.rows != undefined)
- {
- s = _data.item.rows / 20000;
- }
- if (s < .2)
+ if (_data.item.numRows != undefined)
{
- s = .2;
+ // find the item with the most rows
+ var mostRows:Number = 0
+
+ for each (var d:Object in _data.element.dataProvider)
+ {
+ if (d.numRows > mostRows)
+ {
+ mostRows = d.numRows;
+ }
+ }
+
+ s = _data.item.numRows / mostRows;
}
}
- modifiedHeight = modifiedHeight * s;
+
+ if (s < .05)
+ {
+ s = .05;
+ }
+
+ var modifiedHeight:Number = height * s;
var startY:Number = (height - modifiedHeight) / 2;
- var rc:Rectangle = new Rectangle(w, startY, width - 2 * w, modifiedHeight);
+ var rc:Rectangle = new Rectangle(2, startY, width, modifiedHeight);
var g:Graphics = graphics;
g.clear();
g.moveTo(rc.left,rc.top);
- if (stroke)
- {
- stroke.apply(g);
- }
-
- if (fill)
- {
- fill.begin(g,rc);
- }
-
+ fill.begin(g,rc);
+
g.lineTo(rc.right,rc.top);
g.lineTo(rc.right,rc.bottom);
g.lineTo(rc.left,rc.bottom);
g.lineTo(rc.left,rc.top);
- if (fill)
- {
- fill.end(g);
- }
+ fill.end(g);
}
}
View
22 ...ward/census2/views/ChartBackgroundFill.as → ...ard/census2/charts/ChartBackgroundFill.as
@@ -16,17 +16,22 @@ You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-package org.jamesward.census.views
+package com.jamesward.census2.charts
{
+import flash.display.CapsStyle;
import flash.display.Graphics;
+import flash.display.LineScaleMode;
import flash.geom.Rectangle;
-import mx.graphics.IFill;
+
import mx.charts.chartClasses.ChartElement;
import mx.charts.chartClasses.GraphicsUtilities;
+import mx.graphics.IFill;
import mx.graphics.SolidColor;
-[Style(name="fill", type="mx.graphics.IFill", inherit="no")]
+[Style(name="borderFillColor", type="uint", format="Color", inherit="yes")]
+
+[Style(name="fillColor", type="uint", format="Color", inherit="yes")]
public class ChartBackgroundFill extends ChartElement
{
@@ -42,15 +47,10 @@ public class ChartBackgroundFill extends ChartElement
super.updateDisplayList(unscaledWidth, unscaledHeight);
graphics.clear();
- graphics.beginFill(0x111111);
- graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
- graphics.endFill();
- graphics.beginFill(0x151515);
- graphics.drawRect(1, 1, unscaledWidth - 1, unscaledHeight - 1);
+ graphics.lineStyle(1, getStyle("borderFillColor"));
+ graphics.beginFill(getStyle("fillColor"));
+ graphics.drawRect(1, 1, unscaledWidth - 2, unscaledHeight - 2);
graphics.endFill();
-
- //GraphicsUtilities.fillRect(graphics, -1, -1, unscaledWidth + 1, unscaledHeight + 1, new SolidColor(0x111111));
- //GraphicsUtilities.fillRect(graphics, 0, 0, unscaledWidth, unscaledHeight, _fill);
}
override public function mappingChanged():void
View
66 client/src/com/jamesward/census2/charts/StyledAxisRenderer.as
@@ -0,0 +1,66 @@
+package com.jamesward.census2.charts
+{
+ import mx.charts.AxisRenderer;
+ import mx.graphics.Stroke;
+
+ [Style(name="axisStrokeColor", type="uint", format="Color", inherit="yes")]
+ [Style(name="axisStrokeWeight", type="Number", format="Length", inherit="yes")]
+
+ [Style(name="minorTickStrokeColor", type="uint", format="Color", inherit="yes")]
+ [Style(name="minorTickStrokeWeight", type="Number", format="Length", inherit="yes")]
+
+ [Style(name="tickStrokeColor", type="uint", format="Color", inherit="yes")]
+ [Style(name="tickStrokeWeight", type="Number", format="Length", inherit="yes")]
+
+ public class StyledAxisRenderer extends AxisRenderer
+ {
+
+ public function StyledAxisRenderer()
+ {
+ super();
+
+ setStyle("tickPlacement", "none");
+ setStyle("showLine", false);
+ }
+
+ override public function styleChanged(styleProp:String):void
+ {
+ super.styleChanged(styleProp);
+
+ var stylesUpdated:Boolean = false;
+
+ if ((styleProp != "axisStroke") && (styleProp != "minorTickStroke") && (styleProp != "tickStroke"))
+ {
+ if ((getStyle("axisStrokeColor") != null) && (getStyle("axisStrokeColor") != null))
+ {
+ var axisStroke:Stroke = new Stroke(getStyle("axisStrokeColor"), getStyle("axisStrokeColor"));
+ setStyle("axisStroke", axisStroke);
+
+ stylesUpdated = true;
+ }
+
+ if ((getStyle("minorTickStrokeColor") != null) && (getStyle("minorTickStrokeWeight") != null))
+ {
+ var minorTickStroke:Stroke = new Stroke(getStyle("minorTickStrokeColor"), getStyle("minorTickStrokeWeight"));
+ setStyle("minorTickStroke", minorTickStroke);
+
+ stylesUpdated = true;
+ }
+
+ if ((getStyle("tickStrokeColor") != null) && (getStyle("tickStrokeWeight") != null))
+ {
+ var tickStroke:Stroke = new Stroke(getStyle("tickStrokeColor"), getStyle("tickStrokeWeight"));
+ setStyle("tickStroke", tickStroke);
+
+ stylesUpdated = true;
+ }
+
+ if (stylesUpdated)
+ {
+ invalidateDisplayList();
+ }
+ }
+ }
+
+ }
+}
View
8 client/src/com/jamesward/census2/controls/LabelLink.as
@@ -3,10 +3,6 @@ package com.jamesward.census2.controls
import flash.text.StyleSheet;
import mx.controls.Label;
-
- import mx.core.mx_internal;
-
- use namespace mx_internal;
public class LabelLink extends Label
{
@@ -37,7 +33,7 @@ package com.jamesward.census2.controls
private function updateStyleSheet():void
{
- if (!styleSheetValid)
+ if ((!styleSheetValid) && (textField != null))
{
var aLink:Object = new Object();
aLink.color = getStringColor(getStyle("linkColor"));
@@ -50,7 +46,7 @@ package com.jamesward.census2.controls
textStyleSheet.setStyle("a:link", aLink);
textStyleSheet.setStyle("a:hover", aHover);
- styleSheet = textStyleSheet;
+ textField.styleSheet = textStyleSheet;
invalidateDisplayList();
View
60 client/src/com/jamesward/census2/skins/DataGridHeaderSeparator.as
@@ -1,60 +0,0 @@
-/*
-Copyright (C) 2007 James Ward
-http://www.jamesward.org
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-package com.jamesward.census2.skins
-{
-
-import flash.display.Graphics;
-import mx.skins.ProgrammaticSkin;
-
-public class DataGridHeaderSeparator extends ProgrammaticSkin
-{
-
- public function DataGridHeaderSeparator()
- {
- super();
- }
-
- override public function get measuredWidth():Number
- {
- return 2;
- }
-
- override public function get measuredHeight():Number
- {
- return 10;
- }
-
- override protected function updateDisplayList(w:Number, h:Number):void
- {
- super.updateDisplayList(w, h);
- var g:Graphics = graphics;
-
- g.clear();
-
- // Highlight
- g.lineStyle(1, 0xff0000);//getStyle("borderColor"));
- g.moveTo(0, 0);
- g.lineTo(0, h);
- }
-
-}
-
-}
-
-
View
23 client/src/com/jamesward/census2/utils/TextFormatters.as
@@ -24,6 +24,7 @@ import mx.formatters.NumberFormatter;
public class TextFormatters
{
+
public static function byteFormat(labelValue:Object, previousValue:Object=null, axis:IAxis=null):String
{
var nf:NumberFormatter = new NumberFormatter();
@@ -31,15 +32,15 @@ public class TextFormatters
var n:Number = new Number(labelValue);
if (n >= 1000000)
{
- return nf.format(n / 1000000) + "M";
+ return nf.format(n / 1000000) + " MB";
}
else if (n >= 1000)
{
- return nf.format(n / 1000) + "K";
+ return nf.format(n / 1000) + " KB";
}
else
{
- return nf.format(n) + "B";
+ return nf.format(n) + " B";
}
}
@@ -50,36 +51,40 @@ public class TextFormatters
var n:Number = new Number(labelValue);
if (n >= 1000)
{
- return nf.format(n / 1000) + "s";
+ return nf.format(n / 1000) + " s";
}
else
{
- return nf.format(n) + "ms";
+ return nf.format(n) + " ms";
}
}
public static function getBandwidthDataTip(hitData:HitData):String
{
return "<b>" + hitData.item.name + " - " + hitData.item.numRows + " Rows</b>" +
- "<br/>Bandwidth: " +
- byteFormat(hitData.item.bandwidth);
+ "<br/>Transfer Size: " + byteFormat(hitData.item.contentLength) +
+ "<br/><br/><b>Transfer Size Per Row: " + byteFormat(hitData.item.contentLength / hitData.item.numRows) + "</b>";
}
public static function getTimeDataTip(hitData:HitData):String
{
+ var rpsFormatter:NumberFormatter = new NumberFormatter();
+ rpsFormatter.useThousandsSeparator = true;
+ rpsFormatter.precision = 0;
+
return "<b>" + hitData.item.name + " - " + hitData.item.numRows + " Rows</b>" +
"<br/>Server Exec Time: " + timeFormat(hitData.item.totalServerTime) +
"<br/>Transfer Time: " + timeFormat(hitData.item.transferTime) +
"<br/>Parse Time: " + timeFormat(hitData.item.parseTime) +
"<br/>Render Time: " + timeFormat(hitData.item.renderTime) +
"<br/>Total Time: " + timeFormat(hitData.item.totalServerTime + hitData.item.transferTime + hitData.item.parseTime + hitData.item.renderTime) +
- "<br/>Total Rows Per Second: " + (hitData.item.numRows / (hitData.item.totalServerTime + hitData.item.transferTime + hitData.item.parseTime + hitData.item.renderTime) * 1000);
+ "<br/><br/><b>Rows Per Second: " + rpsFormatter.format((hitData.item.numRows / (hitData.item.totalServerTime + hitData.item.transferTime + hitData.item.parseTime + hitData.item.renderTime) * 1000)) + "</b>";
}
public static function getMemoryDataTip(hitData:HitData):String
{
return "<b>" + hitData.item.name + " - " + hitData.item.numRows + " Rows</b>" +
- "<br/>Memory: " + byteFormat(hitData.item.memory);
+ "<br/>Memory: " + byteFormat(hitData.item.memorySize);
}
}
View
258 client/src/com/jamesward/census2/views/ClientSideMemoryChartView.mxml
@@ -17,237 +17,53 @@ You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
-<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:controls="com.jamesward.census2.controls.*" xmlns:views="com.jamesward.census2.views.*" verticalScrollPolicy="off" horizontalScrollPolicy="off">
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:charts="com.jamesward.census2.charts.*"
+ verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Script>
-
- private var _dataProvider:Object;
-
- public function set dataProvider(_dataProvider:Object):void
- {
- this._dataProvider = _dataProvider;
- }
-
- public function get dataProvider():Object
- {
- return _dataProvider;
- }
+ import com.jamesward.census2.utils.TextFormatters;
</mx:Script>
- <!--
- <mx:Script>
- <![CDATA[
- import org.jamesward.census.model.Model;
- import org.jamesward.census.utils.TextFormatters;
-
- [Bindable]
- public var legendIndent:int = 0;
-
- [Bindable]
- public var legendVisible:Boolean = false;
-
- ]]>
- </mx:Script>
+ <mx:ArrayCollection id="dataProvider"/>
<mx:SeriesInterpolate id="interpolate"/>
-
- <mx:HBox id="mainPanelHBox" width="100%" height="100%" horizontalGap="0">
-
- <mx:VBox id="chartPanel" width="100%" height="100%" horizontalAlign="left" verticalGap="0" paddingLeft="4" paddingRight="4" paddingBottom="4" borderThickness="1" borderColor="#2b2b2b" borderStyle="solid" borderSides="top bottom">
- <mx:Spacer height="40"/>
- <mx:HBox width="100%" paddingLeft="15" paddingRight="15">
- <mx:HRule width="100%" strokeColor="#313131" strokeWidth="1"/>
- </mx:HBox>
- <mx:Spacer height="10"/>
- <mx:HBox horizontalGap="0" width="100%">
- <mx:Spacer width="{legendIndent}"/>
- <mx:Legend dataProvider="{loadRenderTimeChart}" direction="horizontal" markerWidth="15" width="100%" visible="{legendVisible}"/>
- </mx:HBox>
- <mx:BarChart id="loadRenderTimeChart" width="100%" height="100%" dataProvider="{Model.getInstance().displayResults}" showDataTips="true" type="stacked" dataTipFunction="TextFormatters.getTimeDataTip" verticalAxisRatio="1">
- <mx:updateComplete>
- legendIndent = loadRenderTimeChart.computedGutters.x;
- callLater(function():void {legendVisible = true});
- </mx:updateComplete>
+ <mx:BarChart width="100%" height="100%" dataProvider="{dataProvider}" showDataTips="true" dataTipFunction="TextFormatters.getMemoryDataTip" verticalAxisRatio="1">
- <mx:backgroundElements>
- <views:ChartBackgroundFill/>
- </mx:backgroundElements>
+ <mx:backgroundElements>
+ <charts:ChartBackgroundFill/>
+ </mx:backgroundElements>
- <mx:verticalAxis>
- <mx:CategoryAxis id="lrtcVA" categoryField="name"/>
- </mx:verticalAxis>
-
- <mx:verticalAxisRenderers>
- <views:CustomAxisRenderer id="chartLeftAxisRenderer" tickPlacement="outside" tickLength="6" axis="{lrtcVA}" showLine="false" placement="left"/>
- <views:CustomAxisRenderer axis="{lrtcVA}" showLine="false" showLabels="false" tickPlacement="none" minorTickPlacement="none" placement="right"/>
- </mx:verticalAxisRenderers>
-
- <mx:horizontalAxis>
- <mx:LinearAxis id="lrtcHA" labelFunction="TextFormatters.timeFormat"/>
- </mx:horizontalAxis>
-
- <mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{lrtcHA}" showLine="false"/>
- </mx:horizontalAxisRenderers>
-
- <mx:series>
- <mx:BarSeries xField="serverExecTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Server Exec Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#e28741" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#c6691c" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- <mx:BarSeries xField="transferTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Transfer Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#467299" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#2a547a" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- <mx:BarSeries xField="parseTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Parse Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#f6c54c" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#d8a62d" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- <mx:BarSeries xField="renderTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Render Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#ff3f20" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#c92719" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- </mx:series>
-
- </mx:BarChart>
-
- <mx:HBox horizontalGap="0">
- <mx:Spacer width="{legendIndent}"/>
- <views:ChartLegendCombo id="clc" charts="{[bandwidthChart,memoryChart]}" visible="{legendVisible}">
- <views:change>
- if (clc.selectedIndex == 1)
- {
- bottomChartsVBox.y = (bandwidthChart.height * -1);
- }
- else
- {
- bottomChartsVBox.y = 0;
- }
- </views:change>
- </views:ChartLegendCombo>
- </mx:HBox>
-
- <mx:Canvas id="bottomChartsCanvas" width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
- <mx:VBox id="bottomChartsVBox" width="100%" height="{bottomChartsCanvas.height * 2}" verticalGap="0" moveEffect="Move">
- <mx:BarChart id="bandwidthChart" width="100%" height="100%" dataProvider="{Model.getInstance().displayResults}" showDataTips="true" fontSize="10" dataTipFunction="TextFormatters.getBandwidthDataTip" verticalAxisRatio="1">
-
- <mx:backgroundElements>
- <mx:Canvas width="100%" height="100%" borderStyle="solid" borderColor="#111111" backgroundColor="#151515" borderThickness="1"/>
- </mx:backgroundElements>
-
- <mx:verticalAxis>
- <mx:CategoryAxis id="bcVA" categoryField="name"/>
- </mx:verticalAxis>
-
- <mx:verticalAxisRenderers>
- <views:CustomAxisRenderer tickPlacement="outside" tickLength="6" axis="{bcVA}" showLine="false"/>
- </mx:verticalAxisRenderers>
+ <mx:verticalAxis>
+ <mx:CategoryAxis id="lrtcVA" categoryField="name"/>
+ </mx:verticalAxis>
+
+ <mx:verticalAxisRenderers>
+ <charts:StyledAxisRenderer axis="{lrtcVA}"/>
+ </mx:verticalAxisRenderers>
- <mx:horizontalAxis>
- <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat"/>
- </mx:horizontalAxis>
-
- <mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{bcHA}" showLine="false"/>
- </mx:horizontalAxisRenderers>
+ <mx:horizontalAxis>
+ <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat"/>
+ </mx:horizontalAxis>
- <mx:series>
- <mx:BarSeries xField="bandwidth" showDataEffect="{interpolate}" itemRenderer="org.jamesward.census.views.BarItemRenderer" displayName="Data Bandwidth">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#44aa77" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#339966" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#246d49" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#111111" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- </mx:series>
-
- </mx:BarChart>
- <mx:BarChart id="memoryChart" width="100%" height="100%" dataProvider="{Model.getInstance().displayResults}" showDataTips="true" fontSize="10" dataTipFunction="TextFormatters.getMemoryDataTip" verticalAxisRatio="1">
-
- <mx:backgroundElements>
- <mx:Canvas width="100%" height="100%" borderStyle="solid" borderColor="#111111" backgroundColor="#151515" borderThickness="1"/>
- </mx:backgroundElements>
+ <mx:horizontalAxisRenderers>
+ <charts:StyledAxisRenderer axis="{bcHA}"/>
+ </mx:horizontalAxisRenderers>
- <mx:verticalAxis>
- <mx:CategoryAxis id="mcVA" categoryField="name"/>
- </mx:verticalAxis>
-
- <mx:verticalAxisRenderers>
- <views:CustomAxisRenderer tickPlacement="outside" tickLength="6" axis="{mcVA}" showLine="false"/>
- </mx:verticalAxisRenderers>
+ <mx:series>
+ <mx:BarSeries xField="memorySize" showDataEffect="{interpolate}" itemRenderer="com.jamesward.census2.charts.BarItemRenderer">
+ <mx:fill>
+ <mx:LinearGradient angle="90">
+ <mx:entries>
+ <mx:Array>
+ <mx:GradientEntry color="#990000" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#6d0000" ratio="1" alpha="100"/>
+ </mx:Array>
+ </mx:entries>
+ </mx:LinearGradient>
+ </mx:fill>
+ </mx:BarSeries>
+ </mx:series>
+ </mx:BarChart>
- <mx:horizontalAxis>
- <mx:LinearAxis id="mcHA" labelFunction="TextFormatters.byteFormat"/>
- </mx:horizontalAxis>
-
- <mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{mcHA}" showLine="false"/>
- </mx:horizontalAxisRenderers>
-
- <mx:series>
- <mx:BarSeries xField="memory" showDataEffect="{interpolate}" itemRenderer="org.jamesward.census.views.BarItemRenderer" displayName="Total Client Memory (Only available with Flex)">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#dd0000" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#990000" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#6d0000" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#111111" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- </mx:series>
- </mx:BarChart>
- </mx:VBox>
- </mx:Canvas>
- </mx:VBox>
- </mx:HBox>
- -->
-</mx:Canvas>
+</mx:VBox>
View
30 client/src/com/jamesward/census2/views/CustomAxisRenderer.mxml
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2007 James Ward
-http://www.jamesward.org
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--->
-<mx:AxisRenderer xmlns:mx="http://www.adobe.com/2006/mxml">
- <mx:axisStroke>
- <mx:Stroke color="#111111" weight="1"/>
- </mx:axisStroke>
- <mx:tickStroke>
- <mx:Stroke color="#111111" weight="1"/>
- </mx:tickStroke>
- <mx:minorTickStroke>
- <mx:Stroke color="#111111" weight="1"/>
- </mx:minorTickStroke>
-</mx:AxisRenderer>
View
123 client/src/com/jamesward/census2/views/RecordsPerSecondChartView.mxml
@@ -17,157 +17,86 @@ You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
-<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:controls="com.jamesward.census2.controls.*" xmlns:views="com.jamesward.census2.views.*" verticalScrollPolicy="off" horizontalScrollPolicy="off">
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:charts="com.jamesward.census2.charts.*"
+ verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Script>
- import mx.collections.ArrayCollection;
- import com.jamesward.census2.utils.TextFormatters;
-
- [Bindable]
- private var chartDataProvider:ArrayCollection = new ArrayCollection();
-
- public function set dataProvider(dataProvider:Object):void
- {
- // translate data into recordsPerSecond
- for each (var item:Object in dataProvider)
- {
- updateChartDataProviderItem(item);
- }
- }
-
- private function updateChartDataProviderItem(item:Object):void
- {
- var recordExists:Boolean = false;
- for each (var chartItem:Object in chartDataProvider)
- {
- if (item.id == chartItem.id)
- {
- recordExists = true;
-
- updateChartItem(chartItem, item);
-
- break;
- }
- }
-
- if (!recordExists)
- {
- chartDataProvider.addItem({id: item.id});
- updateChartDataProviderItem(item);
- }
- }
-
- private function updateChartItem(chartItem:Object, item:Object):void
- {
- chartItem.name = item.name;
- chartItem.numRows = item.numRows;
-
- chartItem.totalServerTime = item.totalServerTime;
- chartItem.transferTime = item.transferTime;
- chartItem.parseTime = item.parseTime;
- chartItem.renderTime = item.renderTime;
-
- if (item.totalServerTime)
- {
- chartItem.totalServerTimeRowsPerSecond = (item.numRows / item.totalServerTime * 1000);
- }
-
- if (item.transferTime)
- {
- chartItem.transferTimeRowsPerSecond = (item.numRows / item.transferTime * 1000);
- }
-
- if (item.parseTime)
- {
- chartItem.parseTimeRowsPerSecond = (item.numRows / item.parseTime * 1000);
- }
-
- if (item.renderTime)
- {
- chartItem.renderTimeRowsPerSecond = (item.numRows / item.renderTime * 1000);
- }
-
- chartDataProvider.itemUpdated(chartItem);
- }
-
+ import com.jamesward.census2.utils.TextFormatters;
</mx:Script>
+ <mx:ArrayCollection id="dataProvider"/>
+
<mx:SeriesInterpolate id="interpolate"/>
<mx:Legend dataProvider="{loadRenderTimeChart}" direction="horizontal" markerWidth="15" width="100%"/>
- <mx:BarChart id="loadRenderTimeChart" width="100%" height="100%" dataProvider="{chartDataProvider}"
+ <mx:BarChart id="loadRenderTimeChart" width="100%" height="100%" dataProvider="{dataProvider}"
showDataTips="true" type="stacked" dataTipFunction="TextFormatters.getTimeDataTip" verticalAxisRatio="1">
+
+ <mx:backgroundElements>
+ <charts:ChartBackgroundFill/>
+ </mx:backgroundElements>
<mx:verticalAxis>
<mx:CategoryAxis id="lrtcVA" categoryField="name"/>
</mx:verticalAxis>
<mx:verticalAxisRenderers>
- <views:CustomAxisRenderer id="chartLeftAxisRenderer" tickPlacement="outside" tickLength="6" axis="{lrtcVA}" showLine="false" placement="left"/>
- <views:CustomAxisRenderer axis="{lrtcVA}" showLine="false" showLabels="false" tickPlacement="none" minorTickPlacement="none" placement="right"/>
+ <charts:StyledAxisRenderer axis="{lrtcVA}"/>
</mx:verticalAxisRenderers>
<mx:horizontalAxis>
- <mx:LinearAxis id="lrtcHA"/>
+ <mx:LinearAxis id="lrtcHA" labelFunction="TextFormatters.timeFormat"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{lrtcHA}" showLine="false"/>
+ <charts:StyledAxisRenderer axis="{lrtcHA}"/>
</mx:horizontalAxisRenderers>
-
+
<mx:series>
- <mx:BarSeries xField="totalServerTimeRowsPerSecond" showDataEffect="{interpolate}" displayName="Server Exec Time">
+ <mx:BarSeries xField="totalServerTime" showDataEffect="{interpolate}" displayName="Server Exec Time" itemRenderer="com.jamesward.census2.charts.BarItemRenderer" left="10">
<mx:fill>
<mx:LinearGradient angle="90">
<mx:entries>
<mx:Array>
- <mx:GradientEntry color="#ffffff" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#e28741" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#c6691c" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
+ <mx:GradientEntry color="#e28741" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#c6691c" ratio="1" alpha="100"/>
</mx:Array>
</mx:entries>
</mx:LinearGradient>
</mx:fill>
</mx:BarSeries>
- <mx:BarSeries xField="transferTimeRowsPerSecond" showDataEffect="{interpolate}" displayName="Transfer Time">
+ <mx:BarSeries xField="transferTime" showDataEffect="{interpolate}" displayName="Transfer Time" itemRenderer="com.jamesward.census2.charts.BarItemRenderer">
<mx:fill>
<mx:LinearGradient angle="90">
<mx:entries>
<mx:Array>
- <mx:GradientEntry color="#ffffff" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#467299" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#2a547a" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
+ <mx:GradientEntry color="#467299" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#2a547a" ratio="1" alpha="100"/>
</mx:Array>
</mx:entries>
</mx:LinearGradient>
</mx:fill>
</mx:BarSeries>
- <mx:BarSeries xField="parseTimeRowsPerSecond" showDataEffect="{interpolate}" displayName="Parse Time">
+ <mx:BarSeries xField="parseTime" showDataEffect="{interpolate}" displayName="Parse Time" itemRenderer="com.jamesward.census2.charts.BarItemRenderer">
<mx:fill>
<mx:LinearGradient angle="90">
<mx:entries>
<mx:Array>
- <mx:GradientEntry color="#ffffff" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#f6c54c" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#d8a62d" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
+ <mx:GradientEntry color="#f6c54c" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#d8a62d" ratio="1" alpha="100"/>
</mx:Array>
</mx:entries>
</mx:LinearGradient>
</mx:fill>
</mx:BarSeries>
- <mx:BarSeries xField="renderTimeRowsPerSecond" showDataEffect="{interpolate}" displayName="Render Time">
+ <mx:BarSeries xField="renderTime" showDataEffect="{interpolate}" displayName="Render Time" itemRenderer="com.jamesward.census2.charts.BarItemRenderer">
<mx:fill>
<mx:LinearGradient angle="90">
<mx:entries>
<mx:Array>
- <mx:GradientEntry color="#ffffff" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#ff3f20" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#c92719" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
+ <mx:GradientEntry color="#ff3f20" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#c92719" ratio="1" alpha="100"/>
</mx:Array>
</mx:entries>
</mx:LinearGradient>
View
269 client/src/com/jamesward/census2/views/TransferSizeChartView.mxml
@@ -17,237 +17,54 @@ You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
-<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:controls="com.jamesward.census2.controls.*" xmlns:views="com.jamesward.census2.views.*" verticalScrollPolicy="off" horizontalScrollPolicy="off">
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:charts="com.jamesward.census2.charts.*"
+ verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Script>
-
- private var _dataProvider:Object;
-
- public function set dataProvider(_dataProvider:Object):void
- {
- this._dataProvider = _dataProvider;
- }
-
- public function get dataProvider():Object
- {
- return _dataProvider;
- }
+ import com.jamesward.census2.utils.TextFormatters;
</mx:Script>
-
- <!--
- <mx:Script>
- <![CDATA[
- import org.jamesward.census.model.Model;
- import org.jamesward.census.utils.TextFormatters;
-
- [Bindable]
- public var legendIndent:int = 0;
-
- [Bindable]
- public var legendVisible:Boolean = false;
- ]]>
- </mx:Script>
+ <mx:ArrayCollection id="dataProvider"/>
<mx:SeriesInterpolate id="interpolate"/>
-
- <mx:HBox id="mainPanelHBox" width="100%" height="100%" horizontalGap="0">
-
- <mx:VBox id="chartPanel" width="100%" height="100%" horizontalAlign="left" verticalGap="0" paddingLeft="4" paddingRight="4" paddingBottom="4" borderThickness="1" borderColor="#2b2b2b" borderStyle="solid" borderSides="top bottom">
- <mx:Spacer height="40"/>
- <mx:HBox width="100%" paddingLeft="15" paddingRight="15">
- <mx:HRule width="100%" strokeColor="#313131" strokeWidth="1"/>
- </mx:HBox>
- <mx:Spacer height="10"/>
- <mx:HBox horizontalGap="0" width="100%">
- <mx:Spacer width="{legendIndent}"/>
- <mx:Legend dataProvider="{loadRenderTimeChart}" direction="horizontal" markerWidth="15" width="100%" visible="{legendVisible}"/>
- </mx:HBox>
-
- <mx:BarChart id="loadRenderTimeChart" width="100%" height="100%" dataProvider="{Model.getInstance().displayResults}" showDataTips="true" type="stacked" dataTipFunction="TextFormatters.getTimeDataTip" verticalAxisRatio="1">
- <mx:updateComplete>
- legendIndent = loadRenderTimeChart.computedGutters.x;
- callLater(function():void {legendVisible = true});
- </mx:updateComplete>
-
- <mx:backgroundElements>
- <views:ChartBackgroundFill/>
- </mx:backgroundElements>
-
- <mx:verticalAxis>
- <mx:CategoryAxis id="lrtcVA" categoryField="name"/>
- </mx:verticalAxis>
-
- <mx:verticalAxisRenderers>
- <views:CustomAxisRenderer id="chartLeftAxisRenderer" tickPlacement="outside" tickLength="6" axis="{lrtcVA}" showLine="false" placement="left"/>
- <views:CustomAxisRenderer axis="{lrtcVA}" showLine="false" showLabels="false" tickPlacement="none" minorTickPlacement="none" placement="right"/>
- </mx:verticalAxisRenderers>
-
- <mx:horizontalAxis>
- <mx:LinearAxis id="lrtcHA" labelFunction="TextFormatters.timeFormat"/>
- </mx:horizontalAxis>
-
- <mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{lrtcHA}" showLine="false"/>
- </mx:horizontalAxisRenderers>
-
- <mx:series>
- <mx:BarSeries xField="serverExecTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Server Exec Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#e28741" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#c6691c" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- <mx:BarSeries xField="transferTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Transfer Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#467299" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#2a547a" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- <mx:BarSeries xField="parseTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Parse Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#f6c54c" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#d8a62d" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- <mx:BarSeries xField="renderTime" itemRenderer="org.jamesward.census.views.BarItemRenderer" showDataEffect="{interpolate}" displayName="Render Time">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#ff3f20" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#c92719" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- </mx:series>
-
- </mx:BarChart>
-
- <mx:HBox horizontalGap="0">
- <mx:Spacer width="{legendIndent}"/>
- <views:ChartLegendCombo id="clc" charts="{[bandwidthChart,memoryChart]}" visible="{legendVisible}">
- <views:change>
- if (clc.selectedIndex == 1)
- {
- bottomChartsVBox.y = (bandwidthChart.height * -1);
- }
- else
- {
- bottomChartsVBox.y = 0;
- }
- </views:change>
- </views:ChartLegendCombo>
- </mx:HBox>
-
- <mx:Canvas id="bottomChartsCanvas" width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
- <mx:VBox id="bottomChartsVBox" width="100%" height="{bottomChartsCanvas.height * 2}" verticalGap="0" moveEffect="Move">
- <mx:BarChart id="bandwidthChart" width="100%" height="100%" dataProvider="{Model.getInstance().displayResults}" showDataTips="true" fontSize="10" dataTipFunction="TextFormatters.getBandwidthDataTip" verticalAxisRatio="1">
-
- <mx:backgroundElements>
- <mx:Canvas width="100%" height="100%" borderStyle="solid" borderColor="#111111" backgroundColor="#151515" borderThickness="1"/>
- </mx:backgroundElements>
-
- <mx:verticalAxis>
- <mx:CategoryAxis id="bcVA" categoryField="name"/>
- </mx:verticalAxis>
-
- <mx:verticalAxisRenderers>
- <views:CustomAxisRenderer tickPlacement="outside" tickLength="6" axis="{bcVA}" showLine="false"/>
- </mx:verticalAxisRenderers>
-
- <mx:horizontalAxis>
- <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat"/>
- </mx:horizontalAxis>
- <mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{bcHA}" showLine="false"/>
- </mx:horizontalAxisRenderers>
+ <mx:BarChart id="bandwidthChart" width="100%" height="100%" dataProvider="{dataProvider}" showDataTips="true" dataTipFunction="TextFormatters.getBandwidthDataTip" verticalAxisRatio="1">
- <mx:series>
- <mx:BarSeries xField="bandwidth" showDataEffect="{interpolate}" itemRenderer="org.jamesward.census.views.BarItemRenderer" displayName="Data Bandwidth">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#44aa77" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#339966" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#246d49" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#111111" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- </mx:series>
-
- </mx:BarChart>
- <mx:BarChart id="memoryChart" width="100%" height="100%" dataProvider="{Model.getInstance().displayResults}" showDataTips="true" fontSize="10" dataTipFunction="TextFormatters.getMemoryDataTip" verticalAxisRatio="1">
-
- <mx:backgroundElements>
- <mx:Canvas width="100%" height="100%" borderStyle="solid" borderColor="#111111" backgroundColor="#151515" borderThickness="1"/>
- </mx:backgroundElements>
-
- <mx:verticalAxis>
- <mx:CategoryAxis id="mcVA" categoryField="name"/>
- </mx:verticalAxis>
-
- <mx:verticalAxisRenderers>
- <views:CustomAxisRenderer tickPlacement="outside" tickLength="6" axis="{mcVA}" showLine="false"/>
- </mx:verticalAxisRenderers>
-
- <mx:horizontalAxis>
- <mx:LinearAxis id="mcHA" labelFunction="TextFormatters.byteFormat"/>
- </mx:horizontalAxis>
-
- <mx:horizontalAxisRenderers>
- <views:CustomAxisRenderer axis="{mcHA}" showLine="false"/>
- </mx:horizontalAxisRenderers>
-
- <mx:series>
- <mx:BarSeries xField="memory" showDataEffect="{interpolate}" itemRenderer="org.jamesward.census.views.BarItemRenderer" displayName="Total Client Memory (Only available with Flex)">
- <mx:fill>
- <mx:LinearGradient angle="90">
- <mx:entries>
- <mx:Array>
- <mx:GradientEntry color="#dd0000" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#990000" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#6d0000" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#111111" ratio="1" alpha="100"/>
- </mx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:BarSeries>
- </mx:series>
- </mx:BarChart>
- </mx:VBox>
- </mx:Canvas>
- </mx:VBox>
- </mx:HBox>
- -->
-</mx:Canvas>
+ <mx:backgroundElements>
+ <charts:ChartBackgroundFill/>
+ </mx:backgroundElements>
+
+ <mx:verticalAxis>
+ <mx:CategoryAxis id="lrtcVA" categoryField="name"/>
+ </mx:verticalAxis>
+
+ <mx:verticalAxisRenderers>
+ <charts:StyledAxisRenderer axis="{lrtcVA}"/>
+ </mx:verticalAxisRenderers>
+
+ <mx:horizontalAxis>
+ <mx:LinearAxis id="bcHA" labelFunction="TextFormatters.byteFormat"/>
+ </mx:horizontalAxis>
+
+ <mx:horizontalAxisRenderers>
+ <charts:StyledAxisRenderer axis="{bcHA}"/>
+ </mx:horizontalAxisRenderers>
+
+ <mx:series>
+ <mx:BarSeries xField="contentLength" showDataEffect="{interpolate}" itemRenderer="com.jamesward.census2.charts.BarItemRenderer">
+ <mx:fill>
+ <mx:LinearGradient angle="90">
+ <mx:entries>
+ <mx:Array>
+ <mx:GradientEntry color="#339966" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#246d49" ratio="1" alpha="100"/>
+ </mx:Array>
+ </mx:entries>
+ </mx:LinearGradient>
+ </mx:fill>
+ </mx:BarSeries>
+ </mx:series>
+
+ </mx:BarChart>
+
+</mx:VBox>
View
30 client/src/readable.css
@@ -222,23 +222,6 @@ List
themeColor: #d6d6d6;
}
-DataGrid
-{
- headerColors: #292929, #131313;
- alternatingItemColors: #161616, #161616;
- verticalGridLines: false;
- horizontalGridLines: false;
- headerSeparatorSkin: ClassReference("com.jamesward.census2.skins.DataGridHeaderSeparator");
- backgroundColor: #151515;
- rollOverColor: #363636;
- selectionColor: #363636;
- borderColor: #111111;
- textRollOverColor: #444444;
- textSelectedColor: #444444;
- themeColor: #292929;
- iconColor: #cccccc;
-}
-
TextInput
{
cornerRadius: 3;
@@ -276,4 +259,17 @@ TabBar
{
strokeWidth: 1;
strokeColor: #dadada;
+}
+
+StyledAxisRenderer
+{
+ showLine: false;
+ tickStrokeColor: #d4d4d4;
+ tickStrokeWeight: 1;
+}
+
+ChartBackgroundFill
+{
+ borderFillColor: #d4d4d4;
+ fillColor: #e5e5e5;
}
View
30 client/src/sexy.css
@@ -222,23 +222,6 @@ List
themeColor: #292929;
}
-DataGrid
-{
- headerColors: #292929, #131313;
- alternatingItemColors: #161616, #161616;
- verticalGridLines: false;
- horizontalGridLines: false;
- headerSeparatorSkin: ClassReference("com.jamesward.census2.skins.DataGridHeaderSeparator");
- backgroundColor: #151515;
- rollOverColor: #363636;
- selectionColor: #363636;
- borderColor: #111111;
- textRollOverColor: #bbbbbb;
- textSelectedColor: #bbbbbb;
- themeColor: #292929;
- iconColor: #cccccc;
-}
-
TextInput
{
cornerRadius: 3;
@@ -276,4 +259,17 @@ TabBar
{
strokeWidth: 1;
strokeColor: #252525;
+}
+
+StyledAxisRenderer
+{
+ showLine: false;
+ tickStrokeColor: #2b2b2b;
+ tickStrokeWeight: 1;
+}
+
+ChartBackgroundFill
+{
+ borderFillColor: #050505;
+ fillColor: #111111;
}

0 comments on commit 0954324

Please sign in to comment.
Something went wrong with that request. Please try again.