1 Reply Latest reply: Jul 3, 2014 1:17 PM by jwellsnh RSS

    Dial Chart with color indicators

    bobmagan

      I'm using APEX4.3 and want to create a Dial (HTML5) chart. I will create a new (chart) page and choose 'Dial" type. I need that dial to be broken down into 3 sections (colors)

      Red < 1

      Yellow 1 thru 1.9

      Green 2 or greater

       

      The query/column to base this on is:

      select avg("Average") from MyTable

       

      Can someone please give me some guidance on setting this up?

      Thanks

        • 1. Re: Dial Chart with color indicators
          jwellsnh

          Hi Bob,

           

          This will require an override of the XML generated by Dial chart; something like this:  You will need to figure out how set your first range of 0 to <1.  I placed the code below after the </scale_bar> tag.

          <color_ranges>
             <color_range start="0" end="10" start_size="50" end_size="50" padding="0" align="Center">
                <fill enabled="true" type="Solid" color="green" opacity="0.5" />
                <hatch_fill />
                <border />
                <effects />
             </color_range>
             <color_range start="11" end="50" start_size="50" end_size="50" padding="0" align="Center">
                <fill enabled="true" type="Solid" color="red" opacity="0.5" />
                <hatch_fill />
                <border />
                <effects />
             </color_range>
             <color_range start="51" end="100" start_size="50" end_size="50" padding="0" align="Center">
                <fill enabled="true" type="Solid" color="blue" opacity="0.5" />
                <hatch_fill />
                <border />
                <effects />
             </color_range>
          </color_ranges>
          

           

          Here is a demo:

          https://apex.oracle.com/pls/apex/f?p=51602:1

           

          See AnyChart documentation here:

          http://www.anychart.com/products/anychart/docs/users-guide/index.html?gauges.html

           

          Jeff