Hey! Teach me about Flex Charting!
Hi.
I've got the following XML coming in from an http service
(XML at bottom)
I want to draw a line chart that has anywhere from 1 to 10
LineSeries, depending on the number of unique
<id>n</id> that come back.
I know I would have to do this in actionscript - found an
example of building a chart
here:
It looks pretty interesting, but still a bit perplexed about
how to refine this based on my data structure.
Any ideas?
Here's the XML code that might come back - notice 3 different
unique <id>'s - but could be more, or less, depending on
other stuff.
"oaktown_matt" <[email protected]> wrote in
message
news:gju9e2$6k6$[email protected]..
> Hi.
>
> I've got the following XML coming in from an http
service (XML at bottom)
>
> I want to draw a line chart that has anywhere from 1 to
10 LineSeries,
> depending on the number of unique <id>n</id>
that come back.
>
> I know I would have to do this in actionscript - found
an example of
> building
> a chart
>
http://flexr.wordpress.com/2008/06/10/piechart-purely-in-actionscript-3/:
>
> It looks pretty interesting, but still a bit perplexed
about how to refine
> this based on my data structure.
You might find this useful:
http://flexdiary.blogspot.com/2008/08/charting-example.html
Similar Messages
-
Flex chart x-axis data spacing
hello
i am using flex chart line series and column series. i want
to display 100 data points, with different dates along the x-axis,
but i don't want all 100 points to be displayed at the same time as
the x-axis dates will not be readable. i want to have a fixed space
between each x-axis point and the user then scrolls along the
chart.
i read the API but do not see any way to add the x-axis
spacing?
also how i do put more data information, with each data point
if a mouse if placed over it, not just the X & Y data points.
thank you for any assistance.
Tonythanks so much,
The tip data solved my 2nd problem.
Thanks for your suggestions to"
i am using flex chart line series and column series. i want
to display 100 data points, with different dates along the x-axis,
but i don't want all 100 points to be displayed at the same time as
the x-axis dates will not be readable. i want to have a fixed space
between each x-axis point and the user then scrolls along the
chart.
i read the API but do not see any way to add the x-axis
spacing?
you mentioned about using min/max values on the x-axis. That
is a good solution except i would then need to add buttons to say
,show the next 30 days.
I really want to to show 90days of data data, with say 30
days appearing at once, and the user just scrolls to see the rest
of the days data without having to press buttons for more data. Any
idea how i can do this?
thanks
Anthony -
Flex chart x-axis spacing between data
hello
i am using flex chart line series and column series. i want
to display 100 data points, with different dates along the x-axis,
but i don't want all 100 points to be displayed at the same time as
the x-axis dates will not be readable. i want to have a fixed space
between each x-axis point and the user then scrolls along the
chart.
i read the API but do not see any way to add the x-axis
spacing?
also how i do put more data information, with each data point
if a mouse if placed over it, not just the X & Y data points.
thank you for any assistance.
Tonythanks so much,
The tip data solved my 2nd problem.
Thanks for your suggestions to"
i am using flex chart line series and column series. i want
to display 100 data points, with different dates along the x-axis,
but i don't want all 100 points to be displayed at the same time as
the x-axis dates will not be readable. i want to have a fixed space
between each x-axis point and the user then scrolls along the
chart.
i read the API but do not see any way to add the x-axis
spacing?
you mentioned about using min/max values on the x-axis. That
is a good solution except i would then need to add buttons to say
,show the next 30 days.
I really want to to show 90days of data data, with say 30
days appearing at once, and the user just scrolls to see the rest
of the days data without having to press buttons for more data. Any
idea how i can do this?
thanks
Anthony -
Convert/Export Flex chart to MS Word
Hi All,
Please let me know how to Convert/Export the Flex Chart to MS Word...
Please send the related links or samples if you have.
Thanks in advance.
Regards,
Seshadri Babu.GWell, "used to..." is not a good business case.
They don't need to receive reports anymore, they can view them in the portal as needed. Viewing in Word is functionaly about the same as viewing in Excel if "receiving" is the preferred method for them.
Having reports in PDF is better if they want to print.
Or they can use Crystal reports as a last resort.... I think those might export to word.
Webi is on-demand, ad-hock reporting, that's what's it for. Export to other formats is a secondary function. -
Flex Charts: Will they improve?
Hello!
I'm trying to make some minimalistic charts for some ultimate PDF business plans and annual reports. I did them in Illustrator first, but Illustrator's graph tool hasn't been developed on since 1996, and it was a real pain to update my charts as the numbers changed. With Flex though, I can just generate charts based on XML that I output from my business models in OpenOffice. Plus they look real good and are interactive.
It seems though, that everyone I talk to say that Flex Charts suck. That they were made by people who didn't follow standards. Personally I love Flex Charts, although I'm not a big fan of having a lot of "Wait for improved CSS support", "Should be CSS" etc. comments in my code:
https://gist.github.com/1623621
https://gist.github.com/1623625
https://gist.github.com/1623628
Does anybody know if this is about to change? Are there any new Flex charting libraries in the making?
--Dwayne
P.S. If you can, please forward this post to as many Flex developers as you can.Flex is now an Apache project (http://incubator.apache.org/flex/) and the future of the charting components will be determined by the open-source community there. However, I think Adobe may contribute some unreleased work that it has done towards a Spark version of the charting components.
Gordon Smith, Adobe -
Flex 2.0.1 SDK Hotfix 1 breaking Flex Charting?
Hi all,
I applied the Flex SDK 2.0.1 Hotfix 1 listed in
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb401224
to my Eclipse Flex Plugin environment with SDK 2.0.1. Unfortunately
this seems to have broken flex charting with the following
compilation errors in my project: Unable to resolve a class for
ResourceBundle: charts.
Now the SDK doesn't have the charts.swc file, so I tried
copying over the charts.swc from my old SDK folder to the
frameworks\libs folder under the new hotfixed SDK. This doesn't
seem to fix the error however. It makes sense as charting it a
separate component but maybe there is an upgraded chart version as
well to work with the hotfixed SDK?
Can anyone provide any guidance here, we are in dire
straights. Any help is greatly appreciated!
Regards,
JasonNope, doesn't say anthing about that
To update the Flex Builder 2 Eclipse plug-in on Windows:
1. Read the Flex Builder 2 Release Notes for any
late-breaking information, updates, and known issues.
2. Download the Flex Builder 2.0.1 Update Installer for
Windows from the Adobe Flex Support Center.
3. Open or double-click the installer executable file.
4. Accept the license agreement and follow the prompts.
5. If the installer detects multiple installations of Flex
Builder 2, it prompts you for the location to be updated.
6. Select which Flash Player 9 browser plug-in to install:
* Internet Explorer
* Netscape or Firefox
Note: Flex Builder 2.0.1 and Flex SDK 2.0.1 can run with the
base version of Flash Player 9 (Version: 9,0,16,0 dated 6/27/07).
However, it's best to install the Flash Player 9 Update.
7. (Optional) When the installation finishes, restart your
computer to ensure that the updated Flash Player browser plug-in is
enabled.
8. Start Flex Builder. -
Hello All
I am in need of your help in saving a flex chart on to the server. Basically I want to export the chart to excel, as I dont find any resource for Flash builder 4, SDK 3.5, I opted the option of 1. saving chart as image to server and 2. accessing that image file in my excel
Any sample codes should be very helpful, as this is quite urgent. Thanks!The problem was, that it is not possible to see the pdf directly from transaction AL11.
I used the transaction CG3Y to move the file from the server to my desktop, and there I can see the pdf file.
Solved
Thanks for the input. -
Flex chart how to put distance between x-axis data
hello
i am using flex chart line series and column series. i want
to display 100 data points, with different dates along the x-axis,
but i don't want all 100 points to be displayed at the same time as
the x-axis dates will not be readable. i want to have a fixed space
between each x-axis point and the user then scrolls along the
chart.
i read the API but do not see any way to add the x-axis
spacing?
thank you for any assistance.
TonyI don't know what you mean then.
If you set the min and max to be a certain number of days
apart then you know the dates within those days will be displayed.
That combined with the width of the chart will define how much
space there is between x-axis points. -
Flex 3 to Flex 4 migration issue (Flex charting and Special char)
Hi All,
I have migrated Flex 3 to Flex 4 and in Flex charting axis label, I am not able to see less then sign ( < ). I tried to use < but it's not working, I have attached sample code.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600" initialize="init()">
<fx:Declarations>
<s:SolidColor id="s1" color="#738994"/>
<mx:SeriesInterpolate id="seriesInterpolate" duration="800"/>
<mx:SeriesSlide id="seriesSlide" duration="800" direction="up"/>
<mx:SeriesZoom id="seriesZoom"
duration="1000"
minimumElementDuration="50"
elementOffset="50"
verticalFocus="top"
horizontalFocus="left"
relativeTo="chart"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var student:ArrayCollection = new ArrayCollection([
{Stream: "Management", Girls:1000, Boys:1400, TotalStudent:2400},
{Stream: "<Computer Science", Girls:800, Boys:1200, TotalStudent:2000},
{Stream: "< Mechanical", Girls:200, Boys:1500, TotalStudent:1700},
{Stream: "> Electical", Girls:800, Boys:850, TotalStudent:1650},
{Stream: "Electronics", Girls:500, Boys:1000, TotalStudent:1500},
{Stream: "Civil", Girls:300, Boys:900, TotalStudent:1200}
private function update():void {
var str:String = catfDP.selectedItem.data;
if(str == "Girls"){
cs1.yField = str;
cs1.displayName = str;
cs1.setStyle("fill" , "738994");
}else if(str == "Boys"){
cs1.yField = str;
cs1.displayName = str;
cs1.setStyle("fill" , "999990");
}else{
cs1.yField = str;
cs1.displayName = str;
cs1.setStyle("fill" , "406374");
private function init():void{
catfDP.selectedIndex= 0;
effectDP.selectedIndex= 0;
]]>
</fx:Script>
<s:Panel title="Chart Effect Example" width="627" height="565">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<mx:ApplicationControlBar dock="true" width="625" height="82">
<mx:Form>
<mx:FormItem label="Category Field:">
<s:DropDownList id="catfDP" change="update();" prompt="--Select--" width="136"
height="19">
<s:dataProvider>
<mx:ArrayList>
<fx:Object data="Girls" label="Girls" />
<fx:Object data="Boys" label="Boys" />
<fx:Object data="TotalStudent" label="TotalStudent" />
</mx:ArrayList>
</s:dataProvider>
</s:DropDownList>
</mx:FormItem>
<mx:FormItem label="Choose Chart Effect:">
<s:DropDownList id="effectDP" change="update();" width="136" prompt="--Select--">
<s:dataProvider>
<mx:ArrayList>
<fx:Object label="seriesInterpolate" data="{seriesInterpolate}" />
<fx:Object label="seriesSlide" data="{seriesSlide}" />
<fx:Object label="seriesZoom" data="{seriesZoom}" />
</mx:ArrayList>
</s:dataProvider>
</s:DropDownList>
</mx:FormItem>
</mx:Form>
</mx:ApplicationControlBar>
<mx:ColumnChart id="cchart"
dataProvider="{student}"
showDataTips="true"
width="621"
fontFamily="verdana" height="402">
<mx:verticalAxis>
<mx:LinearAxis title="Number of Students" />
</mx:verticalAxis>
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{student}"
categoryField="Stream"
title="Stream"/>
</mx:horizontalAxis>
<mx:series>
<mx:ColumnSeries id="cs1"
xField="Stream"
yField="Girls"
displayName="Girls"
fill="{s1}"
showDataEffect="{effectDP.selectedItem.data}"/>
</mx:series>
</mx:ColumnChart>
<s:HGroup>
<mx:Legend dataProvider="{cchart}"
direction="horizontal"/>
<s:VGroup>
</s:VGroup>
</s:HGroup>
</s:Panel>
</s:Application>Thank you very much for you answer.
I have solved this problem using Itemrenderer.
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
autoDrawBackground="true">
<mx:Label htmlText="{data.text}"/>
</s:ItemRenderer>
and in chart I have used labelRenderer. in label I have used < for ( < ) sign.
<mx:horizontalAxis>
<mx:CategoryAxis
dataProvider="{expenses}"
categoryField="Month"
title="FY 2006"
id="a1"
/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer labelRotation="45" axis="{a1}" labelRenderer="chase.BarChartLabelRenderer"/>
</mx:horizontalAxisRenderers>
<mx:verticalAxisRenderers>
<mx:AxisRenderer labelRotation="45" axis="{a1}" labelRenderer="chase.BarChartLabelRenderer"/>
</mx:verticalAxisRenderers> -
hey. i'm about to travel to thiland and i'm thinking to buy there Macbook air\pro. how can i tell if it's fake?
thnksIf possible, I'd make sure to register it on Apple's online system at first start IN THE STORE, and verify it is a kosher serial number before walking out. That way you'll be sure to be covered by the warranty. If the machine is fake, Apple's system won't accept the serial number. If it is stolen and already registered to someone else, it won't accept the repeat registration.
-
hey i forgot about the question and answers and when the balance of 15d and i want to buy software form i tunse for regettably i could
The page that you posted from has instructions for how to reset them i.e. if you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then steps 1 to 5 half-way down that page should give you a reset link.
If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset (these are user-to-user forums).
Contacting Apple about account security : http://support.apple.com/kb/HT5699
When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use -
Flex chart restarts on tab focus in firefox
I have plotted flex chart inside div element. It shows up correctly but when i go to another tab in firefox and comes back then flex chart restarts. Also i have seen it happens inside dojo tabs also.
Anyone has any idea why chart restarts ? How can this be avoided.
Thanks,
ZoozThe author of Custom New Tab says this will be in the next update of the extension.
If you don't want to wait for the approval cycle on the Add-ons site, you can grab it from the Versions page:
https://addons.mozilla.org/firefox/addon/custom-new-tab/versions/
<s>Note: I have not tested it myself.</s>
<u>Version 1.9 worked for me. See screenshot regarding how the Options dialog works for the updated extension.</u> -
Copy and Paste Flex chart to Word Document
Hi , I'm a newbie to Flex and was wondering if anyone knows
if it possible to use the right click button on the mouse to copy
and paste a Flex chart to a Word Document? Any help would be
greatly appreciated.
thanksHi,
Simply let a IE or FireFox window display your Flex chart,
and hold [Alt] and press [PrtSc] in your keyboard, Then, paste it
into Word or Paint to be edited.
Have fun!
Jeffrey -
Hi,
I've put together a simple test app that pulls data from blazeds and inserts the results in a PieChart defined in mxml. However when I try to create the same chart in AS the chart doesn't show up. I suspect that it is perhaps related to the sequence of how things are initialized? but I'm not sure
Here is my code. I've created 3 charts. The first (mxml) chart is the one that works fine. The second (AS) is my attempt to recreate the mxml chart in AS and it does not work. The third is a sanity check of another test AS chart just to see if I can actually make an AS PieChart and it also works fine.
If anyone has any insight it would be much appreciated.
Thank you,
Kaveh
<?xml version="1.0" encoding="utf-8"?>
<!-- intro\intro_remoting.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:data="com.kg.data.*"
width="100%"
height="100%"
initialize="getPokerParameterNumbers()"
backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
import mx.charts.PieChart;
import mx.charts.series.PieSeries;
import mx.charts.Legend;
[Bindable]
public var paramCount:ArrayCollection;
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
{Expense:"Taxes", Amount:2000},
{Expense:"Rent", Amount:1000},
{Expense:"Bills", Amount:100},
{Expense:"Car", Amount:450},
{Expense:"Gas", Amount:100},
{Expense:"Food", Amount:200}
// Get the initial data set from the poker db
private function getPokerParameterNumbers():void {
//remoteObject.getParameterTypesAndCount();
remoteObject.getParameterCount();
addSecondChart();
add3rdChart();
// Handle the recevied message.
private function resultHandler(event:ResultEvent):void {
statusTextArea.text += "Server responded [] : \n";
var myObject:Object = event.result;
paramCount.removeAll();
for (var key:* in myObject)
var value:* = myObject[key];
statusTextArea.text += "Parameter: " + key + " Count: " + value + "\n";
var paramItem:Object = new Object();
paramItem.parameterization = key;
paramItem.count = value;
paramCount.addItem(paramItem);
paramCount.refresh();
private function newResultHandler(event:ResultEvent):void {
var collectionResult:ArrayCollection = ArrayCollection(event.result);
statusTextArea.text += "-" + collectionResult.length + "-";
paramCount = ArrayCollection(event.result);
// Handle a message fault.
private function faultHandler(event:FaultEvent):void {
statusTextArea.text += "Received fault: " + event.fault + "\n";
public function addSecondChart():void {
//var medalsAC:ArrayCollection;
var chart:PieChart;
var series:PieSeries;
//medalsAC = getDataProvider();
/* Define pie series. */
series = new PieSeries();
//series.nameField = "label";
//series.field = "data";
series.nameField = "name";
series.field = "count";
/* Remove default dropshadow filter. */
series.filters = [];
/* Define pie chart. */
chart = new PieChart();
chart.percentWidth = 100;
chart.percentHeight = 100;
chart.showDataTips = true;
//chart.dataProvider = medalsAC;
chart.dataProvider = paramCount;
chart.series = [series];
/* Add chart to the display list. */
topHBox.addChild(chart);
private function add3rdChart():void {
var medalsAC:ArrayCollection;
var chart:PieChart;
var series:PieSeries;
medalsAC = getDataProvider();
/* Define pie series. */
series = new PieSeries();
series.nameField = "label";
series.field = "data";
/* Remove default dropshadow filter. */
series.filters = [];
/* Define pie chart. */
chart = new PieChart();
chart.percentWidth = 100;
chart.percentHeight = 100;
chart.showDataTips = true;
chart.dataProvider = medalsAC;
chart.series = [series];
/* Add chart to the display list. */
p1.addChild(chart);
* Create and return a simple ArrayCollection to
* use as a data provider.
private function getDataProvider():ArrayCollection {
var arr:Array = [];
arr.push({label:"Product 1", data:3});
arr.push({label:"Product 2", data:1});
arr.push({label:"Product 3", data:4});
arr.push({label:"Product 4", data:1});
arr.push({label:"Product 5", data:5});
arr.push({label:"Product 6", data:9});
return new ArrayCollection(arr);
]]>
</mx:Script>
<mx:RemoteObject id="remoteObject"
destination="pokerDataSource"
result="newResultHandler(event);"
fault="faultHandler(event);"/>
<mx:HBox width="100%" id="topHBox">
<mx:VBox>
<mx:PieChart id="myChart"
dataProvider="{paramCount}"
showDataTips="true"
selectionMode="single"
itemRollOverColor="#FF0066">
<mx:series>
<mx:PieSeries
field="count"
nameField="name"
labelPosition="callout"
/>
</mx:series>
</mx:PieChart>
<mx:Legend dataProvider="{myChart}"/>
</mx:VBox>
<mx:TextArea id="statusTextArea"
width="100%"
height="100%"
backgroundAlpha="0"
focusAlpha="0"
selectable="false"/>
</mx:HBox>
<mx:Panel id="p1"/>
</mx:Application>Hi,
Simply let a IE or FireFox window display your Flex chart,
and hold [Alt] and press [PrtSc] in your keyboard, Then, paste it
into Word or Paint to be edited.
Have fun!
Jeffrey -
How can I export an flex chart to excel? Does anyone have any sample code.
Yes, now it's easy with AIR2 (and AS3XLS):
http://coenraets.org/blog/2009/11/open-in-excel-another-air-2-mini-sample/
Thanks,
Oleg.
Maybe you are looking for
-
I have doubt about reverse posting
Hi Sir/Madam, we have reverse posting option in compression in SAP BW 3.5. But we don't have in SAP BI. Why? and how can i delete the recent data after compression is done in the cube.
-
All my content appears on page load - is this Spry related?
I remember having this issue when using Spry in the past. I changed the padding settings I think, and all the Accordions were open on page load - for only a second - and then closed. I'm working with a new site, and the template seemed fine but when
-
The sharemgr utility does not exist on my system
OK... I need to use the sharemgr utility and it's not even installed on my Solaris 10 sparc system. It simply does not exist. There isn't even a man page on it. I installed the Entire Distribution plus OEM support. Anybody know how to get this utilit
-
Installing Oracle Forms Developer 6i Release 2 for Linux (d2k6irelease2.tar)
Hi ! I have downloaded the d2k6irelease2.tar file from OTN. There is no such file present with the distribution which can be executed for installation. Has anybody tried the installation from this file. Please guide. Vineet Loiwal
-
Apologies if this is the wrong forum but I am trying to find a good place to post this. I am looking for some advice on how to sync files and databases (iPhoto and other) between my 250GB laptop and my 500GB desktop. Right now, with the exception of