Actionscript :: Flex: Feed Multiple Series Of Different Array Lengths Into LineChart?
Jan 19, 2012
I'm new to Flex. I've been graphing multiple series in a line chart where all of these series are the same length. Now I need to plot new data and each series has a different length from each other. The question is how to modify the following code to do this.
The initApp() function is called at the start of the program, and it calls function genData() to generate the dataSet used for plotting in the LineChart.
public function initApp():void {
// Initialize data provider array.
dataSet = new ArrayCollection(genData());
[Code]....
Can someone recommend how to place array1, array2, array3, and array4 into x1, y1, x2, y2 (respectively) when the length of array1 and array2 do not equal that of array3 and array4? Or, equivalent outcome.
I'm assuming everything has to come in through dataSet, but I wonder if it's possible to simply reference array1 (etc.) directly from <mx:LineChart ...> or <mx:LineSeries ...> somehow, to avoid wasting memory on an unnecessary array (e.g. dataSet).
View 1 Replies
Similar Posts:
Mar 31, 2009
I'm looking to compare the lengths of several arrays in a conditional loop to make sure they all have the same length. At the moment there are only three arrays which can be bodged with an && operator in the conditional, but I want something more elegant and expandable.
I initially tried this, but found to my suprise that it doesnt work:
[Code].....
View 5 Replies
Jan 15, 2010
Can I create a LineChart with multiple data providers? Since LineSeries has a dataprovider property, I'm assuming the answer is Yes
[Code]...
View 2 Replies
Apr 11, 2011
I want a chart that has several separate series running in rows across. They are largely separate charts and should not overlap, but all share the same horizontal datetimeaxis. They don't share the same y-axis, however and that's where I'm getting stuck.I have tried having a linechart series and then a plotchart series, but it will only allow a single <mx:series> per chart without having them inside the same series which as far as I can tell will place the charts on top of each other in the z-axis. I can stack them and have them completely separate charts, but it was proving to be somewhat irritating having them align correctly.
Is there any reasonable way of combining multiple charts into one like this? Basically having rows in a table where each row is a different chart but the columns are consistent. or am I going to be best served just by stacking separate ones? an illustration of what i'm going for is here: http:[url]........
View 1 Replies
Jun 1, 2011
There is a serious issue I am facing with flash builder charts.
When I load the chart the first time I get this -
But if I refresh the page immediately in the same browser, I get this -
The second one is the expected one. This issue just repeats if I close the browser window and open it in a new browser window. For explaining properly, I am attaching the source code here -
[Code]...
View 1 Replies
Apr 10, 2011
I want to show the second line series underneath the first one, however with this code they are appearing sequentially. Not sure how to make sure they are overlayed! I followed some code I saw for combining charts.. not sure what to do.
<mx:LineChart showDataTips="true" x="10" y="77" id="GlucoseChart" width="1009" height="219">
<mx:horizontalAxis>
<mx:DateTimeAxis dataUnits="hours" parseFunction="parseDateString" displayLocalTime="true" />
</mx:horizontalAxis>
<mx:series>
[Code] .....
View 2 Replies
Jul 17, 2009
I have a line series in a linechart and a slider that goes from 0 to 200. When I now move the slider, I want to have a dot appearing at the chart so when I move the slider to 150, there should be a dot where the x-coordinate of the chart is 150.
View 2 Replies
Apr 12, 2011
I have a LineChart with a DateTimeAxis as horizontalAxis and a maximum set. If a point is beyond the maximum date, the whole segment will not appear. Yet, is there a way to make it appear until it reachs the border of the chart?The code here :
<?xml version="1.0"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
View 1 Replies
Oct 11, 2011
This is my array collection
[Bindable]private var Projects:ArrayCollection = new ArrayCollection( [
{ Department: "Software", TotalProjects: 73,Completed:30,Inprogress:30,Approved:13},
{ Department: "XML",TotalProjects: 50,Completed:20,Inprogress:20,Approved:10},
{ Department: "Publishing",TotalProjects: 25,Completed:5,Inprogress:10,Approved:10},
{ Department: "Indesign", TotalProjects: 70,Completed:30,Inprogress:30,Approved:10},
{ Department: "Imaging", TotalProjects: 42,Completed:30,Inprogress:10,Approved:2}]);
[Code]...
how can i create mx:LineSeries dynamically depending upon array collection values. Now only 4 line series is there but some times i have to show more as per the array collection values change ex: if one more status HoldProject added to array collection?
View 1 Replies
Jun 1, 2010
Is there a way to break the line in a line-chart, if the gap between 2 values on the x axis is bigger then a given value? For example there are 20 values but the first 13 are close to each other on the x axis and should be connected with a line, but the other 7 are a bit far from these and should be connected with another line. The type of values are the same.
View 1 Replies
Jun 21, 2010
I have a line chart with 4 line series with diamond, circle, box and triangle as item renderer for the plots for these 4 line series.Now my requirement is I want to show labels for the plots in the chart. It should be like this : I tried with some item renderes but not getting it correctly since I want to use the circles and triangles to render the plots.
View 1 Replies
Jul 8, 2009
i am working on a line chart on flex which enable me to view the progress of data according to the year. I have tried using a slider to filter but it doesn't seemed to work.
View 4 Replies
Aug 12, 2009
I have a Flex3 LineChart component using an CircleItemRenderer and the datapoints are being cut off because they are too close to the edge. Here's what it looks like: [URL] As you can see, the circles on the left and right sides are being cut off. How can I make the LineSeries area, plus the horizontal labels, narrower so it fits in the chart area?
View 6 Replies
Mar 19, 2010
I'm doing some line charts in my Flex application, and I need to draw segments of those line chart in different color. Does anyone have an idea how this could be achieved? For instance, if I have a code like this (actually, I have given this trivial example for simplicity (the problem is the same)):
[Code]...
View 1 Replies
Mar 31, 2010
I'd like to put a label to each LineSeries on my Flex LineChart so it will be shown next to the line (along it). Any relatively easy way to archieve that?
View 4 Replies
Oct 21, 2011
I have a line chart in flex with a dateTime axis. I am setting the dataprovider to that linechart via actionscript. The graph gets drawn. The problem occurs when i assign a null to the dataprovider so that the graph becomes empty.
Actual code looks similar to the code below :
var actualValues:XMLList=flowChartDP.upFlows;
var localSeries1:LineSeries = new LineSeries();
localSeries1.dataProvider = actualValues;
[Code].....
View 1 Replies
Sep 8, 2009
I need to create LineChart that display datetime points, for example:
public var stockDataAC:ArrayCollection = new ArrayCollection( [
{date: "2005,7,27,22,15,30", close: 41.71},
{date: "2005,7,27,22,16,30", close: 42.21},
[code].....
View 1 Replies
Jan 2, 2011
How do I find number of all the series (combinations of an array that have at least 3 consecutive values, like [7,8,9]) and have the longest number of values?
from [3,4,1,2,2] it would be 2 - ([1,2,3,4] twice, but ignore [1,2,3]*2 and [2,3,4]*2)
from [9,6,7,5,8] it would be 1 - ([5,6,7,8,9])
[Code]....
this will create an array ($ranks) that will have these values [2:2, 3:1, 4:1, 9:1]
from this I will be able to multiply the values under 2,3 ad4 4 and multiply them by 3, so I would get 2*1*1 * 3
how to find the consecutive values, and ignore ones that aren't (like the 9)
View 2 Replies
Jul 7, 2011
I need to be able to animate a LineChart based on the SeriesInterpolate data effect (I will have an Array of dataproiders). I want to have a "Play" button that will:
initialize the LineChart with the first dataprovider in the array start the animation and wait for the animation to finish before loading the second data provider repeat the process until all data providers in the Array are loaded
View 1 Replies
Jun 4, 2009
I am using FlashDevelop to develop flex applications and wanted to paint a LineChart in a panel. I used an example of Adobe itself to be found here. When I compiled it FlashDevelop showed the following output file type was not found or was not a compile-time constantFor Both LineChart and AreaChart.Can someone tell me why this happens? I also tried it in the code by importing mx.charts.LineChart, my code completion found the classes but when compiling the same error occurs.
View 2 Replies
Jan 15, 2010
Im trying to load series of external Swfs into a Movieclip on stage. The swf are 800 x 600 in dimension whereas as the container is 400 X 400.
Whenever i try to load the external swf in the container,the container takes the size of the loaded swf instead of 400 x 400 .How can i overcome this? I want to any swf loaded into the container to be 400 x 400
I'm using the following code :
var movLoad:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadInit = function(thisMc:MovieClip) {
[Code].....
View 1 Replies
Jun 1, 2011
I'm building a page that uses an array to deploy a series of timers that do a variety of things. The problem is at any point the user needs to be able to navigate away from the page and when they do they get a timer tick error. To stop this, I have been trying to write a function that stops all the timers which I can do when I write all the timers out the long way, but I'm failing when trying to stop the timers created with the array. I'm getting the following error:
ReferenceError: Error #1069: Property 3 not found on flash.utils.Timer and there is no default value.
Here is the code:
Code:
var timerRepeats:Number = 1;
var currentTimerLength:Array = [1500, 4500, 500, 1500, 1500];
var i:Number = 0;
var timerCount:Number = 0;
var totalTimers:Number = 3;
[Code] .....
I assume that this relates to my attempt to use the variable to identify each of the various timers and stop them (apparently flash is not actually creating an instance name for each of the timers like it would for a movieclip).
View 2 Replies
Mar 18, 2008
I'm trying to create a SWF that loads a series of FLV files into an array, and then plays them randomly and seamlessly one after another in a continuous, random loop.
View 4 Replies
Jul 13, 2010
How do you display data on a LineChart that cuts off where there is no more data? For example, if I am showing a chart of company revenue for 2010, the chart should only show up to July now (with August and forward on showing no data). This would make the line in the line chart break and dissappear off at about midway through the year.
View 1 Replies
Aug 28, 2011
I am loading these 5 images into a sequence of boxes. Everything works fine except Images are not coming in sequence. They are coming in random order. for Eg.: Box1 contains 3.png, Box2 contains 1.png..so on..[code]
View 7 Replies
May 27, 2011
So I've got an input box on the UI, where integers are entered and stored in an array. I want to find out the average of the integers, but how would I calculate the sum?
View 1 Replies
Feb 28, 2011
My JSON Data file ise data.txt
[
{
"sayim":"1",
"x":"400",
[code]...
and my aim ise to create a Slider which can change starting and ending of the graphic, it is like what is showing in figure 6 in this website and here the MXML codes;
.
..
...
jsonDataArray = JSON.decode(urlLoader.data);
[code]...
The problem is "dataProvider" definition in LineChart, I wrote this code but it is still not working,
dataProvider="{dgg(sayim>=daySlider.values[0] && sayim<=daySlider.values[1])}"
what is the right code to control the LineChart with the Slider.
View 1 Replies
Apr 27, 2010
I have seen the following methods to be used in several online examples, but haven't found any documentation on the recommended way of parsing an XML feed.[code]
View 1 Replies
Feb 26, 2010
why the data points on the LineChart don't line up with the corresponding tick mark / horizontal axis label? See adobe's example (at the bottom of the page):[URL]See how the data for 7/28/05 is to the right of the 7/28/05 tick mark / label?
View 1 Replies
Aug 4, 2010
I am implementing a LineChart in FLEX 4. I have the chart working well except I do not like the default colors and cannot use them, as they do not relate to my data very well. For instance, Orange is not a great default color for my data column "Outdoor temperature". I would rather override it and use a green color if possible.
When I explicitly specify the SolidColorStroke, like so, this breaks the LineChart Legend:
<mx:SolidColorStroke id = "s1" color="haloGreen" weight="2"/>
<mx:LineSeries yField="v1" form="curve" displayName="Indoor Temp" lineStroke="{s1}"/>
^ With this code, The LineChart Legend stops displaying the color for that specific LineSeries, and only displays in black.
How can I override the LineSeries stroke color and persist those colors to the Legend's display?
Is this a FLEX 4 bug? I noticed in FLEX 3 examples (even on Adobe's FLEX 3 Help website) you can override the stroke colors and it persists to the Chart Legend.
View 1 Replies