adding programitically column in flex series graphic does not display the graph

<? XML version = "1.0"? >
<! - example showing using mx:LineSeries vs using as to create graphic series by program - >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' creationComplete = "drawChart ()" layout = "absolute" > "
< mx:Script >
<! [CDATA]
Import mx.controls.Alert;
Import mx.charts.series.ColumnSeries;
Import mx.charts.series.LineSeries;
Import mx.collections.ArrayCollection;

[Bindable]
public var categoryArray:ArrayCollection = new ArrayCollection();
[Bindable]
public var sArray:ArrayCollection = new ArrayCollection();
public function drawChart (): void
{
var histMax:int = 25;
var histMin:int = 5;
var countMax:int = 6;
var tmpArr:Array = new Array();
categoryArray.removeAll ();
for (var n: int = 0; n < 10; n ++)
{
tmpArr [n] = histMin + Math.round ((2 * n) / 20 * (histMax - histMin));
categoryArray.addItem({data:tmpArr[n]});)
}

Add a series to the map with the values x and y
Since the berries and the whole series type on a column chart
for (var chartSeries:int = 0; chartSeries < countMax; chartSeries ++)
{
var tmpseries:Array = new array (10);
for (var i: int = 1; i < 10; i ++)
{
tmpseries = 3 * Math.Random ();
}
CS: ColumnSeries var = new ColumnSeries();
columnchart1. Series.Join (= [cs];
sArray.addItem({data:tmpseries});)
columnchart1. DataProvider = sArray;
CS = new ColumnSeries();
cs.dataProvider = sArray;
cs.displayName = "series."
cs.yField = "data";
columnchart1. Series [chartSeries] = cs;
}
}
[]] >
< / mx:Script >
< mx:Panel title = "Dynamic series adding Sample" width = "195%" height = "90%" layout = "absolute" >
< mx:ColumnChart id = "columnchart1" height = "338" width = "396" showDataTips = "true" type = "stacked" x = "10" y = "0" >
< mx:horizontalAxis >
< mx:CategoryAxis dataProvider = "{categoryArray}" categoryField = "data" / >
< / mx:horizontalAxis >
< mx:verticalAxis >
< mx:LinearAxis baseAtZero = "true" maximum = "3" autoAdjust = "true" / >
< / mx:verticalAxis >
< / mx:ColumnChart >
< / mx:Panel >
< / mx:Application >



http://www.Adobe.com/2006/mxml"creationComplete =" drawChart () "layout ="absolute">"

Import mx.graphics.SolidColor;
Import mx.charts.HitData;
Import mx.controls.Alert;
Import mx.charts.series.ColumnSeries;
Import mx.charts.series.LineSeries;
Import mx.collections.ArrayCollection;

[Bindable]
public var categoryArray:ArrayCollection = new ArrayCollection();

public function drawChart (): void
{
var histMax:int = 25;
var histMin:int = 5;
var countMax:int = 3;
var tmpArr:Array = new Array();
categoryArray.removeAll ();
for (var n: int = 0; n< 10;="">
{
tmpArr [n] = histMin + Math.round ((2 * n) / 20 * (histMax - histMin));
categoryArray.addItem({data:tmpArr[n]});)
}

CS: ColumnSeries var = new ColumnSeries();
columnchart1. Series = [cs];
Add a series to the map with the values x and y
Since the berries and the whole series type on a column chart
for (var chartSeries:int = 0; chartSeries< countmax;="">
{
var tmpseries:Array = new array (10);
for (var i: int = 0; i< 10;="">
{
tmpseries = 1 * Math.Random ();
If (tmpseries
> 0.5)
{
tmpseries = 1;
}
on the other
{
tmpseries
= 0;
}
}

var testArrCol:ArrayCollection = new ArrayCollection();
for (var j: int = 0; j< 10;="">
{
var m:Number = tmpArr [j];
var m1:Number = tmpseries [j];
testArrCol.addItem({mData:m.toString(),nData:m1.toString()});)
}
CS = new ColumnSeries();
cs.dataProvider = testArrCol;
cs.displayName = 'Series' + chartSeries.
cs.xField = 'Montana ';
cs.yField = 'nData ';
columnchart1. Series [chartSeries] = cs;
}
}

public void myTipFunction(hitData:HitData):String
{
return (p:System.NET.mail.MailAddress.DisplayName ColumnSeries (hitData.element) +"-" + hitData.item.mData + "\n" + "value:"+ hitData.item.nData "');
}
]]>











Tags: Flex

Similar Questions

  • JTable with custom column model and model table does not display the table header

    Hello

    I create a JTable with a custom table model and a custom column template. However the table header is not displayed (Yes, it's in a get). I have narrowed the problem down in one compilable example:

    Thanks for your help.
    import javax.swing.*;
    import javax.swing.table.*;
    
    public class Test1 extends JFrame
    {
         public static void main(String args[])
         {
              JTable table;
              TableColumnModel colModel=createTestColumnModel();
              TestTableModel tableModel=new TestTableModel();
              Test1 frame=new Test1();
    
              table=new JTable(tableModel, colModel);
              frame.getContentPane().add(new JScrollPane(table));
    
              frame.setSize(200,200);
              frame.setVisible(true);
         }
    
         private static DefaultTableColumnModel createTestColumnModel()
         {
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
              columnModel.addColumn(new TableColumn(0));
    
              return columnModel;
         }
    
         static class TestTableModel extends AbstractTableModel
         {
              public int getColumnCount()
              {
                   return 1;
              }
    
              public Class<?> getColumnClass(int columnIndex)
              {
                   return String.class;
              }
    
              public String getColumnName(int column)
              {
                   return "col";
              }
    
              public int getRowCount()
              {
                   return 1;
              }
    
              public Object getValueAt(int row, int col)
              {
                   return "test";
              }
    
              public void setValueAt(Object aValue, int rowIndex, int columnIndex)
              {
              }
         }
    }
    Published by: 802416 on October 14, 2010 04:29
    added
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    See http://download.oracle.com/javase/6/docs/api/javax/swing/table/TableColumn.html#setHeaderValue (java.lang.Object)
    When the TableColumn is created, the default headerValue is null
    So the header ends up rendered empty label (probably of size 0 if the JTable calculates its size of header based on the size of the default rendering tool).

    It worked:

         private static DefaultTableColumnModel createTestColumnModel()
         {
              DefaultTableColumnModel columnModel=new DefaultTableColumnModel();
                    TableColumn col = new TableColumn(0);
                    col.setHeaderValue("Header Title");
              columnModel.addColumn(col);
                    return columnModel;
         }
    

    Published by: jduprez on October 14, 2010 14:09
    Beaten by a fraction of a second!

    Published by: jduprez on October 14, 2010 14:10
    OK, by a split of 17 minutes, specifically: o)

  • My firefox does not display the icon fonts!

    I use fontello.com for my web design project. But recently it does not display the icon.

    and the strange thing is that its OK my Firefox friends and just my PC have the problem.

    for example, this page shows icon on my friends firefox but I can't see the icons
    https://DL.dropboxusercontent.com/u/28793409/fontello-d3b0f38a/demo.html

    That's what I see
    https://DL.dropboxusercontent.com/u/28793409/shot.jpg

    If Safe Mode is good, the more likely culprits are one of your extensions or incompatibility of the graphics driver. To work around the second question, you can disable use of the hardware acceleration Firefox to see if that helps.

    "3-bar" menu button (or tools) > Options > advanced

    In the mini ' General' tab, uncheck the box for "use hardware acceleration when available.

    It takes effect the next time you exit and restart Firefox.

  • CD\DVD player does not display the contents of the data DVD.

    CD\DVD player does not display the contents of the data DVD, but will display the content of the data CD.  What is happening on more than one PC, and it began when Active Directory GPOS have been applied for the PC.  If untying policies the problem persists.  What happens on DVD ROM and DVD RAM drives.  Scanning software has been added to these machines, think it might be an ASPI crush.  All these machines are XP SP3 running McAfee.  When you insert a DVD with data on this topic, the name of the drive in windows password DVD RAM drive to CD drive, and if you try and browse the DVD it displays as a blank CD.  I changed something on the PC with the policy but cannot understand what he.  Other identical PC can view the contents of the DVD very well, but they never had the same strategies.  Any ideas, thank you.

    Hi PDoneen,

    The restore of the system; restore the computer to the before date when policies have been launched on one of the affected computer.

    You can check the link for the steps below: how to restore Windows XP to a previous state:http://support.microsoft.com/kb/306084

    Post back with the results.

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • The Task Manager does not display the process and tabs, even if the menu can be seen.

    Dear community, I had a serious problem on my task manager. It does not display the process and tabs, although the menu is visible. Also, any time I open a program or system of adjustment, some and especially no option can be seen since there is no specified words.

    Here is a link that you can see a screenshot on my problem.

    http://kepfeltoltes.Hu/121231/592911021Untitled_www.kepfeltoltes.hu_.PNG

    Thanks in advance for your help

    Original title: Task Manager problem

    I managed to solve the problem by looking for alternatives. Apparently, the problem was caused by a dat file (C:\windows\system32 folder called FNTCACHE.) (DAT) I deleted and it worked like a magic. Everything was normal again.
    Deleted it and the work of all the graphical interfaces as it should.

    Thanks for your answer, in any case. I just post the solution here if someone ever faced with such a question in the future.

    Kind regards
    Laszlo

  • Lightroom does not display the picture in the menu develop, displays a blue spot

    Yesterday, I installed the update to Lightroom. After this update, Lightroom does not display the picture in the menu develop instead, it displays a blue spot. Is this due to a setting? Or a problem with Lightroom? When I split the main display pane, before / after, forward section image is displayed correctly, but the section after just shows the blue flat patch. What could be the problem and how to solve? s ' please see the screenshots.

    Lightroom_issue_10Jun2016.jpgLightroom_issue_10Jun2016_2.jpg

    Go in Edition > Preferences > Performance and uncheck CPU graph use.

    If you're updating your graphics driver, it may be possible to work with this option enabled.

  • My Firefox has just automatically updated itself to the version 42. The extention under modules page does not display the extensions I have installed.

    My Firefox has just automatically updated itself to the version 42. The extention under modules page does not display the extensions I have installed. The plug in page shows the plug ins I installed. How can I fix it? This happened on my 64 bit Windows 7 partition. I installed the extension "classic add-on" to see if she could solve the problem. There is unfortunately no. I have a screenshot. I'm not sure if I have permission to upload it to the media gallery. I also use Linux, but I did not upgrade that are still there.

    It is possible that there is a problem with the files that store the registry extensions.

    Delete the files (extensions.json, extensions.sqlite, extensions.ini) extensions.* and compatibility.ini in the profile folder of Firefox to reset the extensions registry.

    New files will be created if necessary.

    See "extension corrupted files:

  • my iphone 5 s has been disabled. I'm trying to restore my iphone with itunes and itunes asks me to put the password for my iphone. but my iphone does not display the unlock screen. What should I do now?

    my iphone 5 s has been disabled. I'm trying to restore my iphone with itunes and itunes asks me to put the password for my iphone. but my iphone does not display the unlock screen. What should I do now?

    Hello

    Follow the instructions here:

    If you have forgotten the password for your iPhone, iPad or iPod touch, or your device is disabled - Apple supports

  • After installation or upgrade to Firefox 31, starting Firefox does not display the home page, personalize displays a blank page and the radio button does not work

    I am the admin of Windows for a University Department and install PC with Firefox all the time. This problem does not occur with every PC I would maintain, only a selection bit (model different laptops with Windows and update 1 8.1.) Until today, it has happened with the new user (with admin rights) accounts that I place on laptops for our staff. Today, this happened with the account administrator while setting up a new laptop. In all cases so far, I have install Windows from a registered image that was created by using sysprep.

    I tried many suggestions to reset Firefox, removing the profile of Firefox users, removing the Windows profile users, uninstalling/reinstalling Firefox, uninstall/reinstall of Firefox and the latest Java, but nothing helped. After uninstalling, I run an application to delete the caches and temporary files and even remove manually the keys to register HKLM\SOFTWARE\Mozilla and HKCU\SOFTWARE\Mozilla. I restart and make sure that the installation folder is deleted after uninstalling.

    Results are the same: after installing Firefox 31, the initial settings for migration, IE or Chrome pop up and after having clicked on the button finish, Firefox starts but does not display the home page of the new user, only a blank page. By clicking on the Options (3 bars) button does nothing. Right click in the appropriate box, the shortcut menu appears, so I can choose to customize, but which opens another tab with subject: Customize the URL and the page is blank. In the right click context menu, I can activate the menu bar and get options from that.

    My last attempt helped a little. I uninstalled Firefox 31, cleaned, removed the profile user Firefox, rebooted and then installed Firefox 30. Initial start-up runs and tells me that I'm not up-to-date and the works of button Options. But I can't always customize.

    Then I upgraded to Firefox 31, but then it's back to no start page, no options button and no customization. I can go down to 30 and get customize practically works again.

    Addon only is for McAfee Scriptscan to Firefox 15.1.0, just after installation is disabled.

    Any help would be appreciated. Thank you.

    You can try a different theme of Windows?

    Have you tried to start the computer using Windows safe?

    Start the computer in Mode safe mode with network support Windows (on the startup screen, press F8) as a test.

  • When I open a link in a new window does not display the web address.

    When I open a link in a new window does not display the web address. What have I done wrong? It used to work and it works if I open the link in a new tab, the problem is that I hate to use tabs prefer a new window every time... Help!

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • URL address box does not display the current page.

    With the 4.0.1 update, the URL address box does not display the current page.

    All that shows is the text: «Go to web site»

    To now see the url of the current page, you need to make a right click the empty space is the address box and press the button "esc".

    Is there a way to display the url of the current page?

    This problem may be caused by an extension that is not working properly.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Navigation toolbar does not display the URL

    When I go to a website, the section of the navigation toolbar that displays the URL of the page is no longer indicates the URL http://www as he always did in the past. The size of the part has been reduced. Has expanded the area where you type URL for search engine. I have no problem with the navigation, history, bookmarks, tabs bar, etc. Only problem is that the URL does not display the page. Even this page has no URL displayed in the navigation bar. It has the logo for mozilla and when I put the cursor on it, it says it all "Web site does not provide identity information." The same shows for each site than go. Yes, I can to bookmark the page without any problem and can use bookmarks to return to the page. But no URL appears in fact as he always did in the past. Oh, I have an IMac and use a keyboard of razor.

    Hello.

    You should be able to resize the address bar, if the search bar is to the right by simply sliding the space between the address bar and the search bar.

    If that does not solve your problems, it is possible that you have a problem with some Add on Firefox which is an obstacle to the normal behavior of your Firefox. Have you tried to disable all add-ons (just to see) to see if Firefox goes back to normal?

    Whenever you have a problem with Firefox, whatever it is, you must make sure that it is not caused by one (or more) of your installed modules, whether an extension, a theme or a plugin. To do this easily and cleanly, start Firefox in safe mode (remember to select disable all add-ons when you start safe mode). If the problem goes away, you know that it's an add-on. Disable them all in normal mode and allow them one by one until you find the source of the problem. See this article for more information on troubleshooting extensions and themes and this one for plugins.

    If you need help with one of your modules, you will need to contact the author.

    If the problem does not disappear when all add-ons are disabled, tell me please, then we can work from there. Please be afraid not to follow my instructions to the line, as everything can be easily undone.

  • Save dialog box under does not display the list of files

    Terminal Server R2 of 2012.  Dialog box "Save as" for a user does not display the list of files.  The address bar shows the way, there is a form for the file name box, and the user can save the file successfully.  But the space that would show the files in the selected directory is empty.  There is no form for the list of files box, it's just the grey box dialog box space - that is to say, it is not that it looks like an empty folder, there is simply no display form box.

    The 'Open' dialog box appears normal, showing the list of files in the selected folder.

    I had the user close the session on the Terminal Server and access it from another PC, even if I was not expecting to make a difference, and it didn't.  I have also connected on myself and has not experienced the same problem.  So it seems to be user-specific.

    What a setting, the user has selected by mistake, or a mistake any?

    Thanks for any help.

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • my pc does not display the sound icon and I have no sound of my speakesrs are pluged

    sound works when last used. PC does not display the icon of audio and have no sound

    Hello jeffreysarver,

    Thanks for choosing Windows and thank you for providing an opportunity to help you.

    According to the description, it seems that you are having problems with the sound. As I understand well you can't listen to audio.

    I need to ask you some questions to help you better.

    1. were there any changes (hardware or software) to the computer before the show?

    2. the problem when you play system sounds?

    Perform the steps suggested by Sebastian M from the link below and check.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_xp-pictures/no-sound-in-my-Windows-XP-computer/b2ad45d8-3242-4837-A728-b233ffd3f73c

    Answer to us if you are having problems with the sound or any other problem of Windows, and I'd be happy to help you.

    Good day!

    Hope this information helps.

  • My explore menu does not display the drives. How can I solve this problem?

    Original title: hard drives

    My explore menu does not display the drives.  How can I solve this problem?

    Hello fpiraro,

    Thanks for the return of the response.  Please visit the link below and let us know the status.

    My drive does not appear in Windows Explorer

    http://support.Microsoft.com/kb/330140

    • Microsoft Windows XP Professional
    • Microsoft Windows XP Home Edition
    • Windows Vista Business
    • Windows Vista Business
    • Windows Vista Home Basic
    • Windows Vista Edition Home Premium
    • Windows Vista Starter
    • Windows Vista Ultimate Edition
    • Windows 7 business
    • Windows 7 Home Basic
    • Windows 7 Home Premium
    • Windows 7 Professional
    • Windows 7 Starter
    • Windows 7 Ultimate

Maybe you are looking for

  • Limitation GPU Qosmio X 770-107 / Frameratebreakdown all in game

    Hello have been reviewed by the Nvidia-diver-Thread already but now here in an own topic: many users of this laptop you have the problem that the Framerate breaks every few minutes in actual games like Dirt3 that makes em unplayable. When they * turn

  • There is no tab sync in the preferences pane. I am running firefox 5.0.1 for mac

    When I go to set up firefox sync there no synchronization menu in the preferences pane. There is still an option under Tools for 'sync', but seems not to do anything. I am running firefox 5.0.1 for mac.

  • Cookies and website data keep reappearing after removal

    When I delete old or unused cookies and the Web site data in the preferences of Safari (9.1), they keep reappearing, a lot of sites I haven't visited in months or years. I guess they are be re-populated icloud. How do I delete and ask them to stay go

  • The Pavilion s5-1014 has an integrated sound card?

    I am trying to install a program of first speech requiring an audio input through a microphone.  I use Windows 7 64-bit.  It installed OK but when I try to open it, a message says "can not find the media device.  Check if your computer has a sound ca

  • You are looking for an application

    Hello, I used the blackberry for a long time. but this year, I lost one of my favorite most used apps.  It allowed me to prewrite of text messages and after speaking to my text, I could then choose from a list of commonly used phrases and I text ofte