skip to the main content area of this page
In Appreciation of Open Flash Chart

OFC-2 - Y Axis Logarithmic Scale

Open Flash Chart Logo

This patch implements the capability to plot against a Y Axis using a logarithmic scale. Only base 10 is currently supported. Also negative values and fractions are not handled properly yet.

You must add the "log-scale":true property to the Y Axis definition and it is recommended that you provide specific locations for the labels instead of using the "steps" feature.

Patch Information

ID #TBD - Y Axis Logarithmic Scale

I will generate a patch after the next release of OFC2.

Download a prebuilt SWF and source code on the Downloads page.

As of 17 January 2009:

Keys Legend Enhancements HAVE NOT been included in OFC2 Development

Sample Chart

Here is a sample chart demonstrating a Y Axis with a logarithmic scale.

Here is a link to view the JSON. Here is a quick look at the JSON:

              "y_axis":{
              "min": 1,
              "max": 3000000,
              "steps": 100000,
              "log-scale":true,
              "labels":{"labels":[{"y":1},
                                  {"y":2,"text":""},
                                  {"y":3,"text":""},
                                  {"y":4,"text":""},
                                  {"y":5,"text":""},
                                  {"y":6,"text":""},
                                  {"y":7,"text":""},
                                  {"y":8,"text":""},
                                  {"y":9,"text":""},
                                  {"y":10}, 
                                  {"y":100}, 
                                  {"y":1000}, 
                                  {"y":10000}, 
                                  {"y":100000}, 
                                  {"y":200000,"text":""},
                                  {"y":300000,"text":""},
                                  {"y":400000,"text":""},
                                  {"y":500000,"text":""},
                                  {"y":600000,"text":""},
                                  {"y":700000,"text":""},
                                  {"y":800000,"text":""},
                                  {"y":900000,"text":""},
                                  {"y":1000000}, 
                                  {"y":2000000},
                                  {"y":3000000},
                                 ]}
                     },
                     
                     "elements":[
                         {"type":"scatter_line",
                          "colour":"#00B9FF",
                          "text":"Avg",
                          "font-size": 10,
                          "dot-size":  3,
                          "tip":"[#x#, #y#]",
                          "values":[{"x":1, "y":1},
                                    {"x":2, "y":2},
                                    {"x":3, "y":20},
                                    {"x":4, "y":200},
                                    {"x":5, "y":2000},
                                    {"x":6, "y":20000},
                                    {"x":7, "y":200000},
                                    {"x":8, "y":2000000}
                                   ]
                         }
                     ],
                     ...

"log-scale":true, indicates that the Y Axis should be a logarithmic scale.