area chart with different fill colours

Help
2008-03-12
2013-05-28
  • Martin Landa
    Martin Landa
    2008-03-12

    Hi all,

    I am completely new here, don't so much about java/action script so maybe a newbie question.

    Is it possible to use different fill color in 'area chart' based on intervals? Or how much complicated would be to implement this?

    Thanks for any hits, notes...

    Best regards, Martin Landa

     
    • monk.e.boy
      monk.e.boy
      2008-03-13

      can't do it - sorry :-(

      monk.e.boy

       
    • Martin Landa
      Martin Landa
      2008-03-13

      I can try to modify the code (as files), if I am right, I need to compile actionscript file into swf object and for this I need proprietary Adobe Flash? No Free way? Sorry I have never done something with flash, etc.:-) Martin

       
    • Martin Landa
      Martin Landa
      2008-03-14

      OK, I found some Free Software tools to compile actionscripts into flash object file (swf), e.g. mtasc. But compilation fails, e.g

      $ mtasc -out open-flash-chart.swf open-flash-chart.as
      open-flash-chart.as:4: characters 0-1 : parse error Unexpected #

      Sorry I haven't found some 'Building notes' or something similar. Thanks for help. Martin

       
    • Martin Landa
      Martin Landa
      2008-03-14

      I tried to modify AreaHollow class and update swf file using mtasc, fails on

      mtasc AreaHollow.as -swf open-flash-chart.swf -version 8
      Style.as:60: characters 16-21 : type error Cannot call non-function object #Array

      Any hits? Martin

       
    • I did it with a little trick but it's not perfect : the fill is interupted when you change color

      If you want 2 different colors then create 2 lines, one where the first part is null and one where the second part is null

       

  • Anonymous
    2011-06-27

    Hi Martin , I´m doing something like that , try this,If you use a JSON file to generate the area chart, you can do 2 or more charts with different colors using segment values,for example, with negative and positive values
    .

    {
            "type":"area",
            "width":0.5,
            "fill":"#85A7DA",
            "fill-alpha": 1,        
            "colour": "#85A7DA",
            "text": "",
            "font-size": 10,
            "halo-size": 1,
            "dot-size":0.5, 
            "values":   [positive values],
            "on-show":  {"type": "explode", "cascade":2, "delay":0.25}
        },
            {
            "type":"area",
            "width":0.5,
            "fill":"#E1031A",
            "fill-alpha": 1,        
            "colour": "#E1031A",
            "text": "",
            "font-size": 10,    
            "values":   [negative values],
            "on-show":  {"type": "mid-slide", "cascade":1, "delay":0.25}
    }
    

    I'm also new to OFC but hopefully this will be useful
    regards..!!