1 Reply Latest reply on Nov 15, 2011 2:30 AM by kireykova

    How do I change the default colors used by Flex charts controls?

    NoMan'sLand Level 1

      Default 28 colors in mx.charts.styles.HaloDefaults.

      I want to add some colors, How should I do?

        • 1. Re: How do I change the default colors used by Flex charts controls?
          kireykova

          I'm tryint to solve the same problem. There is a solution to reset the array (or to change in your case) HaloDefaults.defaultColors on the preinitialize event for example for Application.

          <s:Application ... preinitialize="onPreinitialize()">

          <fx:Script>

                  <![CDATA[

               import mx.charts.styles.HaloDefaults;

               use namespace mx_internal;

               import mx.core.mx_internal;           

           

               public static const myDefaultColors:Array = [ 0xff000b, 0xc87eb];

           

               private function onPreinitialize():void{

                    HaloDefaults.defaultColors = myDefaultColors;

               }

               ]]>

          </fx:Script>

          <!-- Some chart -->

          </s:Application>