Remove series from linechart array

hi people.
i need some help about this.
i have a linechart with multiple series ... adding with
dinamic whit this.
private function addSeries():void {
var ls:LineSeries = new LineSeries();
ls.dataProvider = dataChartBig3;
ls.yField = "preculti";
for(var i:uint=0; i<dataXmlDown.length; i++){
ls.displayName = dataXmlDown.getItemAt(i).nombre;
bigChart.dataProvider = ls.dataProvider;
lineasAc.push(ls);
bigChart.series = lineasAc;
how can i remove a "x" serie from that line chart ?

System.arraycopy()
You're almost certainly better off with a List implementation, though. Whether you use LinkedList or ArrayList should depend on your usage specifics, but from the limited information provided it seems that LinkedList would be a better choice.

Similar Messages

  • How to eliminate or remove zeros from 1D array

    How to eliminate or remove zeros from 1D array. Let say I have 1D array having foolowing elements
    "0 0 0 0 0 4 0 0 9 0 0 1 4 0 0 0 0 0 0 0 0 10 9 0 0"
    So after removing or eliminating zeros it will become as follow
    "4 9 1 4 10 9"
    So can any body guide me how can I do that? See attached Image for details.
    Thanks 
    JK

    altenbach a écrit :
    hchiam wrote:
    Here are 2 example .vi's I made based on altenbach's removeZeroes.png in this discussion thread: 
    It seems pretty pointless to post those because no new useful information is given.
    Currently, only the input is defined in the connector pane, making them useless as subVIs.
    unlike my example using integers, an "=0", like any "equal" comparison, is potentially dangerous with DBLs.
    Reshaping a 2D array to 1D before removing zeroes is pretty pointless because a 2D output cannot be recovered. A more interesting scenario would be to remove some columns or rows (e.g. that are all zeroes) from a 2D array.
    You should also clean up the front panel, e.g. properly zero the upper left corner, make the controls/indicators nicely labeled, sized and arranged, and maybe even add scrollbars to the arrays.
    Thank you for those comments.
    Now the input and output are defined (in the updated attachments) for use as example subVI's.  I also cleaned up a few visual details, but I leave the rest for others to cater to their specific uses if they don't want to use this as a subVI (or at least as-is), such as changing the icons or changing to integers instead of doubles.
    I'm not sure about what you mean exactly with "=0" being "potentially dangerous with DBLs".  I'm guessing you had a certain case scenario in mind.  Although the subVI's seem to work fine within my larger program and situation, my situation may not generalize with regards to this point.
    I reshaped from 2D to 1D, with a 1D output, because it could be helpful for things like when later processing just needs a 1D array.  For example, in my situation I had to remove a huge spike of unnecessary "0"'s from a previous subVI that were affecting the output display of a certain histogram.  So it turned out a 1D array output was helpful, and you never know what problems come up, so I included the 2nd example.
    Hopefully if someone is looking for this, they can just use or play with an example subVI (granted that they know how to plug things in for their context).  I was hoping to post a subVI people could put to direct use.

  • Is there a way to remove elements from an array 1 by 1?

    I have an two arrays, and they vary in size depending on a parameter set by the user (both arrays are the same size though, they both can vary in length). What I need to do, is remove elements one by one from the array, and use these as indices for another array. Basically, I built two arrays to store x-values on a graph. At the first value on the first array, I want y values on the graph to move from 0 to Y (any value). Then on the first value on the second array, I want the y values to move back from Y to 0 (creating a pulse, essentially, from the first value on the first array and the first value on the second array). By having each x value act as an indice for the y array, I belive I can acc
    omplish this (ie, y =0 up to indice 90, then y = 5, then at indice 100, y goes back to equaling 0). I know this is poorly phrased, but it's difficult to explain. If anyone could help me out, I'd really appreciate it.

    jdaltonnal,
    Note: to add an attachment based on your comment of 6/12/01 to my earlier reply, I had to go back to this 'answer' mode, which gives me the option of adding attachments.
    Per your comment, you have a sequence, so I've added a simple sequence structure and the 2nd array to provide a 250ms delay between each array output. Let me know...Doug
    Attachments:
    arrayindexplus1withseqdelays.vi ‏27 KB

  • Remove series from legend

    Post Author: vjromeo
    CA Forum: Charts and Graphs
    I'd like to be able to remove a series from the legendor perhaps there's another way to crack this nut... in a stacked-bar chart, we want a trendline for the sum of the stacked bars (i.e. the top of each stack).  In Excel, I did this by adding a series that was the sum of the bars in a stack and added a trendline based on that series.  I set the series to be transparent, deleted it from the legend (which one can easily do in Excel), and everything was great.  I've figured out how to do all of this in Crystal, except delete the legend entry for the transparent series (and add the trendline to the legendbut that's a question in a separate post).

    Post Author: Dan3D
    CA Forum: Charts and Graphs
    If you just want to display a datalabel which is the sum of each stack , this functionality is built into the product. Go to right-mouse-menu ChartOptions and then the DataLabels tab and then select "Show Totals".

  • How to remove series from a chart?

    Hi,
    I want to remove a serie from a chart with 2 series. I've tried app.columnChart.removeChild(app.columnChart.series[1]);
    to remove the second serie, but it doesn't work. The error it writes is:
    The supplied DisplayObject must be a child of the caller. Please help.
    Rene

    Thanx for reply.But this is not what i am looking for.I need
    to apply different colors for each bars.I am generating charts
    dynamically.The item renderer is working fine.But at specific
    condition the item renderer shold ne removed from the chart series

  • How do u remove something from an array (char)

    (sorry im have just started to learn java.)
    if (Character.isWhitespace(inputTextArray[inputTextArray.length - 1]))
    inputTextArray[inputTextArray.length - 1] = null;
    how can i remove the value out of the position of the array im in.

    Once you've created an array, its size is fixed forever, so you cannot remove elements from it.
    What you will need to do is to construct a new array that contains the same text, but with the white space ommitted. Since you won't know how big the new array is until you've gone through the first one, you need something whose size is not fixed at the beginning.
    Given that you're dealing with text, I'd suggest you take a look at StringBuffer.
    Sylvia.

  • Color Problem when Aadding/Removing series from Chart

    Is it possible to define the color of the series to add in a Chart?
    Actually, the color seems to be defined in a precise order by the chart itself when adding the series. I think there's a list of predefined colors and for each series added to the chart, it take the next color of the list. Then, when we remove a series, the pointer in that list of colors is decremented.
    That behavior does not suit me. If i remove a series and add it again there are cases where two series can have the same color...
    Example:
    add series 1 - color blue
    add series 2 - color red
    add series 3 - color cyan
    remove series 2
    add series 2 - color cyan
    series 2 and 3 have the same color
    (you can test this behavior)
    So is there a mean to avoid this problem and set the color of series ourself?
    Thanks

    If you search the http://javafx-jira.kenai.com you will come across quite a few open bugs to do with dynamically modifying charts by adding and removing series and data - so I guess, if you are currently using this feature, then proceed with caution (and don't use the chart animation feature) until they are fixed (and log new issues if yours is not already captured).

  • Removing Movieclips from an Array Displayed on stage

    Hi Everyone ,
    I am new to AS3 so please forgive me in advance if I end up annoying anyone ;(
    I need some help in removing Movie Clips from the stage , these were initially loaded off an array
    Here is the Code with the NEXT Button , : for both ARRAYS , Notes and Notes15 ( referring to 15th frame)
    function nextframepop2(Event:MouseEvent):void{
    trace("Mouse Enabled");
    removeChild(notes15[4]);
    removeChild(notes15[3]);
    removeChild(notes15[2]);
    removeChild(notes15[1]);
    removeChild(notes15[0]);
    nextFrame();
    function nextframepop1(Event:MouseEvent):void{
    trace("Mouse Enabled");
    removeChild(notes[1]); // This is Line 635 , but I am not sure what I am doing wrong here.
    removeChild(notes[0]);
    nextFrame();
    I am calling this Function with an If Statement , I need to make sure all the Movie Clips are loaded before the End User decides to move to next slide.
    Here is what I get when I run the Next Button ,
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at PORTDemoPresent_fla::MainTimeline/nextframepop1()[PORTDemoPresent_fla.MainTimeline::frame 2:635]
    Can anyone please help ?

    Based on what you show it is likely that some other function (like the one before it as shown) has already removed the object.  What you should do is learn to use the trace function to troubleshoot your code.  In this case put in a trace anywhere you add or remove the same object that tells you whether it is added or removed and which line of code it is, realizing that you might be storing the same object with different references to it.  That way you should be able to isolate where things are being removed when you don't expect them to be.

  • How to remove item from my array

    hi, I have one array with items. now I want to remove all items from array. How it can be possible ?

    You're welcome.
    I have noticed a few silly mestakes in my posts. You probably caught them, but just for clarity:
    1. yourArray.length without brackets ();
    2. < instead of <= in the loop conditions;
    3. when looping with pop() function, the initial length of the array has to be saved in a variable and this variable should be used in condition, because with each loop the length of array changes:
             var arrayLen:int = yourArray.length;
              for (var i:int = 0; i < arrayLen ; i++)
                   yourArray.pop();

  • Removing movie clips in arrays

    Hi there
    I have this code in my Flash file:
    for(bubble in bubbleArray){
         bubbleArray[bubble]._y -= 3;
         if(bubbleArray[bubble]._y < 370){
              bubbleArray[bubble].removeMovieClip();
    I'm wondering, when I remove the movie clips should I also be popping them from the array?
    I have an onEnterFrame function that attaches the movie clips and pushes them into the array, so I'm worried that if I don't pop them the array will continue to increase in size and slow down the movie. Is this the case, or will they be automatically removed from the array by the removeMovieClip() method above?

    Looks like I spoke too soon. I imagined that removing them from the array would be easy, but I'm struggling.
    The movie clip that is removed from its parent clip and should be removed from the array will not always be the first element in the array, and I'll need to remove multiple clips at a time. I've put in a trace action to trace the length of my array, and after about ten seconds it contains about 2500 elements, most of which have already been removed using the removeMovieClip() method. I'm worried this will slow down the movie.
    So to clarify: How can I remove these elements from my array when I remove them from the stage?
    I tried to include something like:
    while(bubbleArray[0] == undefined){
         bubbleArray.shift();
    but it caused Flash Player to freeze up. Also, if I trace bubbleArray[0] it is only "undefined" before something is pushed into the array. Once the clip has been removed from the stage, the trace just returns a blank line, not "undefined".
    I'd appreciate any help.
    Here is all my code:
    stop();
    splash.stop();
    var i:Number;
    var j:Number = 0;
    var minBubbles:Number = 10;
    var maxBubbles:Number = 20;
    var bottomBubbleLimit:Number = 0;
    var topBubbleLimit:Number = 1;
    var bubbleNumber:Number;
    var bubbleX:Number;
    var bubbleY:Number;
    var bubbleScale:Number;
    var bubbleMinScale:Number = 30;
    var bubbleMaxScale:Number = 100;
    var fewerBubbles:Number;
    var ring:String;
    var ringArray:Array = [ringAnimation.ring1, ringAnimation.ring2];
    var bubbleArray:Array = [];
    ringAnimation.onEnterFrame = function(){
        for(ring in ringArray){
            if(ringArray[ring]._y > 370){
                bubbleNumber = (minBubbles + (Math.random() * (maxBubbles - minBubbles)));
                for(i = 0; i < bubbleNumber; i++){
                    bubbleX = ((ringArray[ring]._x - (ringArray[ring]._width / 2)) + (Math.random() * ringArray[ring]._width));
                    bubbleY = ((ringArray[ring]._y - (ringArray[ring]._height / 2)) + (Math.random() * ringArray[ring]._height));
                    bubbleScale = bubbleMinScale + (Math.random() * (bubbleMaxScale - bubbleMinScale));
                    ringAnimation.attachMovie("bubble", "bubble" + String(j), this.getNextHighestDepth(), {_x:bubbleX, _y:bubbleY, _xscale:bubbleScale, _yscale:bubbleScale});
                    bubbleArray.push(ringAnimation["bubble" + String(j)]);
                    j++;
        for(bubble in bubbleArray){
            bubbleArray[bubble]._y -= 3;
            if(bubbleArray[bubble]._y < 370){
                bubbleArray[bubble].removeMovieClip();
        trace(bubbleArray.length);
        if(ringAnimation._currentFrame == 6){
            splash.gotoAndPlay(1);
        }else if(ringAnimation._currentFrame == 12){
            splash.gotoAndPlay(1);
    fewerBubbles = setInterval(reduceBubbles, 600);
    function reduceBubbles(){
        if(minBubbles > bottomBubbleLimit){
            minBubbles--;
        if(maxBubbles > topBubbleLimit){
            maxBubbles--;
        if(minBubbles == bottomBubbleLimit && maxBubbles == topBubbleLimit){
            clearInterval(fewerBubbles);

  • Removing zeros from data stream

    Hi
    I have incoming data (plz see attached diagram which shows the 2 states of the for loop '0' and default) which is a 1-D array of 64 bit real data .....it goes through the loop which removes zeros from the array.
    As I have 3 elements in the 1-D array (call them x,y,z ), the loop works very well for all values of 'y' and 'z' .
    However when x gets towards 1 and below say 10e-3 (it never is a negative number), the loop is rounding everything to 1 and then when the value gets between 1 and 0 (10e-3 for example) the loop leaves it out altogether and I just get y,z  values saved.
    Plz help me sort this out .
    Cheers
    Baz
    Attachments:
    zeros.PNG ‏25 KB
    zeros.PNG ‏25 KB

    If you want a tolerance comparison, try the attached VI.  I rewrote it from one in vi.lib after an earlier post.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    CheckForEquality(DBL).vi ‏23 KB

  • How do I remove NaN values from an array?

    I'm trying to test if the values in an array are less than 0.001. All of them are...BUT the problem is that some of the elements in the array are NaN. I'd like to do one of two things:
    1. Remove the NaN elements from the array and set them to zero to make the test work.
    2. Make the test understand that NaN elements are okay.
    The test results in a boolean array of T/F values. If all of the values of the boolean array are T, it will result in a single boolean value of T. In #2, I am saying that I want it to test if an element of the array is less than 0.001 OR equal to NAN.
    Solved!
    Go to Solution.

    Your statements don't make much sense. It's irrelevant how many NaNs are in the array. A sort will move them all to the bottom. You had said you wanted to find out if all the elements in an array are less than 0.001, and that you've got some NaNs in there. Well, this will do that:
    twolfe13 wrote:
     I did see how to remove NaN once, but couldn't determine a good way to generalize it other than doing a test loop. I thought there might have been a simple function that I overlooked to do this.
    As I noted, there have been several posts in the past about efficient techniques for removing certain elements out of an array. Seek, and ye shall find.
    Joseph Loo wrote:
    Have you look at the coerce function where you can set the lower and upper limit?
    That won't do anything for NaN. Or perhaps I misunderstood what you are suggesting to do?
    Attachments:
    NaN sort.png ‏20 KB
    NaN sort small.png ‏5 KB

  • How do I removing a specific item from an Array?

    Hi there.
    I am having an array of movieclips and when my circle(controlled with the keyboard) hitTests true with one of the movieclips inside that array i want to remove that movieclip from the array so when i hitTest it again it returns false (I hitTest using a "for in" with that array).
    How do i remove a specific item from within an array?
    Can someone help me? Thanks a lot.

    i haven't noticed anyone showing deference because of the points.  in fact, i've seen some people (a minority, to be sure) be just obnoxious about it.  i never encountered that before:  some people feel they have power because they can dole out points.
    but overall i agree with you:  the loss of the list of threads i am participating in, along with the most recent posters name, is a significant drawback of the new forums.  and there's nothing new in these forums that offsets that drawback.
    in addition, i think we've lost way more than 1/2 the older threads.  that's a lot of information that's no longer available.

  • Remove specific row and column from 2d array

    Hi,
    I would like to know how to remove the specific row and column from 2d array.
    for example, I have the original 4x4 array as below
    2 -1 -1 0
    -1 2 0 -1
    -1 -1 2 0
    -1 -1 -1 3
    let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
    2 -1 0
    -1 2 -1
    -1 -1 3
    Thanks.

    You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
        Integer[][] bar = new Integer[5][5];
        for (int i = 0; i < bar.length; i++) {
            Integer[] baz = bar;
    Arrays.fill(baz, i);
    System.out.println(Arrays.toString(baz));
    Integer[][] muu = new Integer[5][4];
    removeColumn(3, bar, muu);
    for (Integer[] mee : muu) {
    System.out.println(Arrays.toString(mee));
    Integer[][] smuu = new Integer[4][5];
    removeRow(3, bar, smuu);
    for (Integer[] mee : smuu) {
    System.out.println(Arrays.toString(mee));
    public static <T> void removeRow(int row, T[][] a, T[][] result) {
    if (row >= a.length) {
    throw new IllegalArgumentException("no row at " + row);
    for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
    if (a_r == row) {
    continue;
    System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
    result_r++;
    public static <T> void removeColumn(int col, T[][] a, T[][] result) {
    for (int i = 0; i < a.length; i++) {
    if (col >= a[i].length) {
    throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
    for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
    if (a_i == col) {
    continue;
    result[i][r_i] = a[i][a_i];
    r_i++;

  • Removes duplicates from a sorted array without having to create a new array

    Funcation removes duplicates from a sorted array without having to create a new array

    Funcation removes duplicates from a sorted array
    without having to create a new arrayIs a 'funcation' like a vacation but more fun or
    something?LMFAO. You just jumped with both feet on one of my biggest peeves. I've been outed!
    Actual words/phrases I've seen used which I hate with every fiber of my being:
    "Mrs. Freshly's"
    "McFlurry"
    "Freshissimo"
    "Spee-dee"
    "Moons Over My Hammy"
    One of my favorite SNL skits had Will Ferrell leading a panel of movie reviewers (they're the worst for this kind of junk). Each one had some cheesy pun to describe their respective movie. Ferrell topped the show off with his endorsement of "Fantasia 2000 is Fantasgreat!"
    LOL.
    "Come to Slippy Village - it's a FUNCATION!"
    &#167; (runs off, laughing maniacally, head explodes)

Maybe you are looking for