Can I access Flex's default Chart colors? Or can I access a Series' current color?

I've created a popup to dynamically add/remove Series from a LineChart and/or AreaChart.  Problem is, I want to keep the Series' line color consistent, and Flex wants to re-assign them from it's default list, which is confusing.
I don't want to just set the Series.visible to false for two reasons:
1. I also want the LegendItem to disappear from the Legend
2. Stacked AreaCharts (type == 'stacked') get messed up when you set one of its Series.visible = false
So to avoid color reassignment, I want to explicitly set the lineStroke for my Series.  But if I'm using Flex's default colors, I need to either:
a. Have access to the static default color array - does anyone know where this is???  or
b. After the Series are drawn (updateComplete?), I need to query each for its lineStroke color and then explicitly set it to that same color.  How do I do this???  getStyle('lineStroke') returns null, and I can't see a way to get at the renderer.
I'm essentially re-posting the following unanswered posts, which I promise to link back to this if someone can please help:
Binding to Rendered Chart Data [http://forums.adobe.com/message/186840#186840]
Getting the default pie chart colors [http://forums.adobe.com/message/36410#36410]
Please help!

Matt, thanks for your reply, but unfortunately, for LineCharts, LineSeries.getStyle('fill') always returns 0xffffff (white).
I finally found that after my LineChart is completely rendered, (sometime after LineSeries' updateComplete), LineSeries.getStyle('lineStroke') and getStyle('stroke') both return the correct Stroke.color values ("lineStroke" refers to the line segment and "stroke" to the data point).
Rather than fooling around with collecting the actual values dynamically, I just generated some trace() output from a  LineChart with a bunch of Series to create my own static Array from which I can initialize my Series.setStyle(color) as I dynamically add them to my LineChart:
        public static const DEFAULT_FLEX_SERIES_COLORS:Array = [
            0xe48701, 0xa5bc4e, 0x1b95d9, 0xcaca9e,
            0x6693b0, 0xf05e27, 0x86d1e4, 0xe4f9a0,
            0xffd512, 0x75b000, 0x0662b0, 0xede8c6,
            0xcc3300, 0xd1dfe7, 0x52d4ca, 0xc5e05d,
            0xe7c174, 0xfff797, 0xc5f68f, 0xbdf1e6,
            0x9e987d, 0xeb988d, 0x91c9e5, 0x93dc4a,
            0xffb900, 0x9ebbcd, 0x009797, 0x0db2c2
It turns out there's only 28 unique color values before the color pattern repeats.  I don't see a numerical pattern; perhaps someone with more time on their hands can figure out if there's a function behind this series of values (printed here in binary, decimal, and hex):
        111001001000011100000001  14976769  0xe48701
        101001011011110001001110  10861646  0xa5bc4e
        000110111001010111011001  01807833  0x1b95d9
        110010101100101010011110  13290142  0xcaca9e
        011001101001001110110000  06722480  0x6693b0
        111100000101111000100111  15752743  0xf05e27
        100001101101000111100100  08835556  0x86d1e4
        111001001111100110100000  15006112  0xe4f9a0
        111111111101010100010010  16766226  0xffd512
        011101011011000000000000  07712768  0x75b000
        000001100110001010110000  00418480  0x0662b0
        111011011110100011000110  15591622  0xede8c6
        110011000011001100000000  13382400  0xcc3300
        110100011101111111100111  13754343  0xd1dfe7
        010100101101010011001010  05428426  0x52d4ca
        110001011110000001011101  12968029  0xc5e05d
        111001111100000101110100  15188340  0xe7c174
        111111111111011110010111  16775063  0xfff797
        110001011111011010001111  12973711  0xc5f68f
        101111011111000111100110  12448230  0xbdf1e6
        100111101001100001111101  10393725  0x9e987d
        111010111001100010001101  15440013  0xeb988d
        100100011100100111100101  09554405  0x91c9e5
        100100111101110001001010  09690186  0x93dc4a
        111111111011100100000000  16759040  0xffb900
        100111101011101111001101  10402765  0x9ebbcd
        000000001001011110010111  00038807  0x009797
        000011011011001011000010  00897730  0x0db2c2
Anyway, it sure would have been nice to have access to this in the API - hopefully I've saved someone else the time I've wasted...

Similar Messages

  • Default Chart Color Set in Keynote '08

    Hi!
    I have several charts on successive slides. I'd like to keep the colors used for some data consistent across all charts in which they appear. I can't seem to locate the default color samples and I'm pretty sure I've been through all the 3D and 2D samples.
    How do I find the default colors used in bar charts?
    Thanks!

    Instead of going to the graphic section, go to the Chart Section (8th from the left) and then in the top right hand side click Chart Colors. From the box that pops up, select the color and drag over the section of the graph you want that color.
    Message was edited by: Kelly Coull for spelling

  • Getting the default pie chart colors

    Hello,
    I have a pie and a bar chart that display the same
    information... Pie charts colors are filled automatically, and I
    would like to use those colors for my bar chart as well... is there
    any way to get those colors?
    Tnanks.

    I ran into this issue myself and figured it out here:
    Can I access Flex's default Chart colors? Or can I access a Series' current color?

  • How to display JHeadstart flex item default values

    Dear All,
    I have defined a number of FlexRegions and FlexItems and I'd like to display the default values (specified by a SQL query in the Flex Item Def Editor) next to the input text field using the JSF EL expression #{row.defaultValue}.
    This works fine as long as the user has not provided a new value for the flex item. Once (s)he has done this, the default value gets cleared. I've been able to programmatically obtain the default value by invoking the method executeDynamicQuery("somename", row.getDefaultValueQuery()) on the FlexItemDefsOuterJoinedWithFlexItemsRowImpl instance, but
    I'd like to be able to always display the original default value in the .jspx page.
    Any suggestions would be greatly appreciated.
    I'm using JDeveloper 10.1.3.3. and JHeadstart 10.1.3.2.52.
    Regards,
    Ibrahim

    Hi Steven,
    Thanks for your reply. You're absolutely right of course. We wanted to provide functionality to submit 'request for change' requests, whereby we would display the current value of a given attribute (e.g. salary) next to the new value provided by the user.
    We wanted to 'misuse' the default value query aspect of flex items for this purpose. The flex item default value query would be used to retrieve the current value each time the request for change record is displayed.
    We managed to achieve this via a trick, so please consider this post as solved.
    Once again many thanks for a marvelous product.
    Regards,
    Ibrahim

  • I would like to change the colour of bars in a chart without losing the underlying default texture associated with my chosen theme. None of the 3D textured fills offered in "Chart Colors" match the textured fill of the theme. Any suggestions?

    I would like to change the colour of bars in a chart without losing the underlying default texture associated with my chosen theme. None of the 3D textured fills offered in "Chart Colors" match the textured fill of the theme. Any suggestions?

    Thanks Gary, but no, that does not work. First of all, I can't select each bar individually. When I click on one bar, all three bars are selected.
    When I use "inspector > graphic" I have 5 fill options: none, color, gradient, image, tinted image. The default selection for the theme I'm using is image. What I would like to use for my charts is the same image that this theme uses for table headers. It has the same texture as the chart, but a different colour. Using anything but image or tinted image removes the texture from the fill.
    I have found I can do one of two things. I can select tinted image from the fill selections in "inspector > graphic" or I can select 2D Image Fills from "inspector > chart > chart colors". The first choice does not allow me to match the table header colour because it only allows me to apply a tint to the existing colour and adjust its opacity. The existing colour has too much influence on the fill, so I can't find an RGB adjustment that will match the table header colour. The image selections from "inspector > chart > chart colors" do not quite match the colour or the texture. Again, I can try to tint the image, but I still can't get it to match and the texture is not the same anyway.
    The image I want to use obviously exists in the software as it is an attribute of the theme, but for some reason is inaccessible. The other angle I have tried is to edit the theme, but I can't figure out how to do that either.

  • Flex 4.5.1 SDK & default-background-color Compiler Argument

    Hey guys,
    I was scanning the available compiler arguments list (http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a92.html) for Flex 4.5 SDK and noticed that the -default-background-color argument is gone (I realize it's been gone since 4 just haven't used the SDK much lately).  My background shows up as black when I run my app (it's an AS3 app with the new Away3D 4.0 Broomstick library) and there is no Flex code in my app so I was depending on this compiler argument to set my background color to white.
    How can I achieve this now that the argument is no longer available?  I just simply want to have a white background without physically having to create a white sprite in the back of my scene.  Is this possible anymore?
    Matt

    Simeon,
    Thanks for that, I had a brainfart and forgot you can have the properties defined in that manner.  I changed it but it still wasn't working which made me realize I had to change the backgroundColor property on the view in Away3D.  I realized this after trying the params for the class and then not adding the view (which had a white bg) and then i looked at the docs and bam, there it was.  Thanks!
    Matt

  • Chart color palette , where can I change it?

    Hi
    I would like to change the colors on the charts, in other tools there are usually color palette for this kind of issues. Where can I find OBIEEs chart color palette ?
    Kind Regards

    Hi ketori86,
    I apologize, I'm a bit unclear on the exact nature of your question. If you are looking for more information about Restrictions or Parental Controls, you may find the following article helpful:
    iOS: Understanding Restrictions (parental controls) - Apple Support
    Regards,
    - Brenden

  • Flex 4 lacks the default-background-color compiler option?

    Hello,
    started converting my Flex 3 applications to Flex 4 and noticed that Flex 4 lacks the default-background-color compiler option.
    Flex 3 has it: http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html
    Flex 4 doesn't: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a92.html
    This raises a question: how am I supposed to keep my background from flashing from grey to white when the RIA is loaded? Is it possible to use preloader with background set to whatever color I like to see? Any easier solutions?
    Best regards,
    Jukka

    This works for me:
    @namespace mx "library://ns.adobe.com/flex/mx";
    mx|Application{
         background-color:#ffffff;
    Of course if you have changed the Application element to spark equivalent, you have to change the namespace.
    Regards,
    Jukka

  • How can I change the default text color (black to blue) in Mail on Mountain Lion

    How can I change the default text color (black to blue) in Mail on out going email with Mountain Lion

    There really aren't default outgoing font settings. They are only there for viewing. A workaround I have seen mentioned is to start you signature with the font style you want to use. When you start your message, click in that first part of your signature.
    Something like
    defaults
    Signature

  • How can I change the default blue colors of Planning web forms?

    Hi,
    how can I change the default blue colors of Planning web forms and the Logon screen colors?
    thanks

    That PDF file mentioned updating file HspCustomImgs_en.template in D:\Hyperion\deployments\WebLogic9\servers\HyperionPlanning\webapps\HyperionPlanning\custom folder:
    But for what I needed to do, here's another undocumented file to change color in right side menu: Update global.css file
    in D:\Hyperion\deployments\WebLogic9\servers\HyperionPlanning\webapps\ HyperionPlanning\ui_themes\tadpole

  • Can I change default tag colors?

    I have added other tags which by default have no color; can I edit the default tag colors to add new colors?

    romit3 wrote:
    Re backward compatibility, I'd understand if it was to avoid removing functionality, but adding functionality (ie the ability to choose more colours) shouldn't be a problem at all should it?
    Yes, here's why:
         http://arstechnica.com/apple/2013/10/os-x-10-9/9/#tags-implementation
    That 0C bit pattern represents the Red Label. Only three bits in the Finder Info are allotted for the Label color, which means there can be a maximum of seven Label colors (001 through 111, reserving 000for when there’s no Label). Red is color number 6: 0x0C is 1100 in binary, but the last bit is not part of the Label’s bitfield. We’re left with 110, which is 6 in base ten.

  • Can I set Mail default text color

    Is there a way to set default text color for sent messages?  These settings don't seem to have any effect:

    Only way I know how is to save a Draft with some character, even a space with color set & use that to Draft send.
    Or maybe set a Favorite in CMD+t in Mail.

  • Print outs have thin border when -default-background-color is set

    Hey everyone.  In my application the print out have this very thin border.  The -default-background-color is set to #333333 (dark grey) and this is the problem.  When I set the color to #FFFFFF (white), the thin borders go away.
    When I set the default-backgroun-color to #FFFFFF, my loading screen is white.  I don't want that.
    Does anyone know how I can have my loading screen with a #333333, but not have the thin border lines around my print outs?  Setting the border properties on the printed component doesn't work.  The problem is with the background color.
    Thanks for reading.
    Tom

    Still hacking away at this problem.
    I thought I had the fix until I deployed the AIR application.  Setting the -default-background-color to white worked fine when running from flex builder, but when I installed the application.  The "borders" are still showing.
    Has anyone had any experience with this?  I'm printing Point of Sale receipts and they look like crap with these lines around them.  On top of this, some printers print differently.  The HPs print a border around the whole component. The Brother printers just print the left and right.  One of my customer's printers just prints the bottom and right borders.

  • Default background color issue

    Hi,
    I am trying to change themes at run-time using
    StyleManager.loadStyleDeclarations(). Whenever I switch to a theme,
    the default theme's background color shows up for a fraction of a
    second. I tried using the "StyleEvent.COMPLETE" event handler but
    it doesn't seem to work. Is there a way to remove this? I want the
    transition from my current theme to the next theme to be smooth
    without the default background color appearing. If anybody can
    please provide a solution for this, It would be a great help.
    Thanks,
    Jai

    quote:
    Originally posted by:
    LuigiL
    Project -> Properties -> Flex Compiler -> add the
    default color:
    -default-background-color 0xFFFFFF
    That's not what he's talking about... He's saying if you load
    a CSS file with loadStyleDeclarations(), it will momentarily flash
    the default, green Halo theme before switching to the new style...
    If I load up my white theme (White.swf -- compiled to swf from css)
    and then I want to change to my red theme (Red.swf) like:
    StyleManager.unloadStyleDeclarations("White.swf");
    StyleManager.loadStyleDeclarations("Red.swf");
    At the * point in the execution, it will flash the green Halo
    theme instead of just making a smooth transition from white to
    red... It doesn't look so professional...
    I have the same problem when switching themes, and it's very
    annoying... Guess I'll keep an eye on this thread...

  • Chart colors

    Post Author: vitalya
    CA Forum: Charts and Graphs
    Hello all,
    I use Crystal Reports XI. I have report with chart. Chart type is Bar.  With Chart expert i defined colors for each type of data in the chart. When i preview my report chart colors looks fine. But if i use created rpt file in web application and generate html report chart uses different colors. What a problem? 

    Post Author: quincarroll
    CA Forum: Charts and Graphs
    HiI am having a very similar problem...I have a pie chart that is displaying 8 values for scores that make up the total score. If I preview the chart in Crystal XI, I get the correct colours for each slice of the pie, but when I save the rpt and run it from my VS2005 App, the first 4 colours on the pie revert back to the default 4 colours and the last 4 colours stay the same as what I set using the "Color Highlight" tab in the design env.Can anyone please help?

Maybe you are looking for

  • Install Adobe Acrobat 9 Pro Extended 30 day trial problem

    I have downloaded and expanded for Adobe Acrobat 9 Pro Extended installation. I run AutoPlay.exe. It takes me two screens so I can browse cd, read license....... and press "Install Adobe Acrobat 9 Pro Extended " Nothing happends..... I have tried wit

  • IDoc - Incorrect Number Sequence

    Hi, I have created a custom IDoc and sending it to 2 different SAP boxes. This has been triggered every half an hour interval. But my problem is IDoc numbers are not in proper sequence Below find the screen image of WE02. Here you see the IDoc No. 42

  • Control Key Toggles Mut

    My left control key toggles mute for some **bleep** reason after i installed this X-FI, its an Xtreme Gamer Fatalty Pro series. I can not find settings for hot keys in the audio console or anywhere else. Any help here? I am on winxp pro, just install

  • Setting up vacation rules from Mass Timecard Approval Responsibilty.

    Our users are using the Mass Timecard Approval for Oracle OTL to approve timecards. This does not however seem to have a link to set up vacation rules. It seems they can only do this from their workflow homepage however we don't want to have to re-as

  • KPro Requirements

    Hello all, We are looking at implementing KPro and Document Management Systems. This will be a small environment of about 200 total users of which many will not be concurrent so the load will be fairly light. I have a couple questions: 1) What would