Releasing a simple, powerful and extensible Map component developed using ActionScript and Flex 3. The idea is that a map contains one or more polygons representing each sub-region. Each polygon can have mouse events attached to it and can have further properties set. This concept is further extended in my second map component i.e. the Choropleth Map that will be released later this week so stay tuned!
Posts Tagged ‘Visualization’
This component extends the default Legend component and adds to it few item highlighting related features. It works with all chart types and clicking on a legend item will lead to its visibility being toggled. Furthermore mouse over legend item leads to reduction of alphas of other chart series except the related chart series of the legend item on which the mouse is over.
Code:
<visualization:AdvancedLegend dataProvider="{lineChart}"/>
Screenshot:

What’s next?
– Checkboxes based selectable legend items
– Chart series item style controls via legend
This version (0.1) of the DashedLineSeries component is an extension and implementation of the wonderful code posted on Quietly Scheming by Ely Greensfield. The component is an extension of a regular LineSeries except that it has a custom LineSeriesRenderer that draws a dashed line instead of a straight line.
Screen shot:
Code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:visualization="net.srirangan.visualization.*">
<mx:Script><![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{Month:"Jan", Profit:2000, Expenses:1500, Amount:450},
{Month:"Feb", Profit:1000, Expenses:200, Amount:600},
{Month:"Mar", Profit:1500, Expenses:500, Amount:300}
]);]]></mx:Script>
<mx:Panel title="Line Chart With Strokes">
<mx:LineChart id="myChart" dataProvider="{expenses}" showDataTips="true" seriesFilters="{new Array}">
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{expenses}" categoryField="Month"/>
</mx:horizontalAxis>
<mx:series>
<visualization:DashedLineSeries yField="Profit" displayName="Profit"/>
<mx:LineSeries yField="Expenses" displayName="Expenses"/>
<mx:LineSeries yField="Amount" displayName="Amount"/>
</mx:series>
</mx:LineChart>
<mx:Legend dataProvider="{myChart}" direction="horizontal"/>
</mx:Panel>
</mx:Application>
What’s next?
– Pre defined multiple line patterns
– User defined line patterns
Worked on a charting component for Adobe Flex 3. The idea behind the component is to create one single object, specify a single dataProvider and have 6 different charts generated. Simple, routine stuff.
<visualizations:MultiChart id="multiChart" width="640" height="480"
backgroundColor="#ffffff" title="Default chart title" legendHeight="40"/>
[Bindable]
public var dataArrayCollection:ArrayCollection = new ArrayCollection;
public function creationCompleteHandler():void {
dataArrayCollection.addItem(new ArrayCollection([{"x":115, "y":120, "z":125, label: "Series1.1"},{"x":215, "y":220, "z":225, label: "Series1.2"},{"x":215, "y":220, "z":225, label: "Series1.3"}]));
dataArrayCollection.addItem(new ArrayCollection([{"x":415, "y":420, "z":425, label: "Series2.1"},{"x":15, "y":520, "z":525, label: "Series2.2"},{"x":615, "y":620, "z":625, label: "Series2.3"}]));
dataArrayCollection.addItem(new ArrayCollection([{"x":75, "y":75, "z":75, label: "Series3.1"},{"x":45, "y":50, "z":235, label: "Series3.2"},{"x":324, "y":654, "z":345, label: "Series3.3"}]));
multiChart.dataProvider = dataArrayCollection;
multiChart.refresh();
}
A few screens..
This is the first release so there isn’t any real documentation available, but there is a demo, an example and the source code. It should really be self explanatory at this stage. One thing, the object needs to be refreshed [refresh()] after changing the dataProvider. It has been left like this on purpose.
What’s next?
– Smart legends
– Timer based chart switcher
– Exposing more chart, axis, legend, panel styles to the user
– Themes.. etc.


