1 Reply Latest reply: Aug 26, 2013 10:53 AM by Jeff E RSS

    flash charts apex4.1, x-axis number with no decimal places

    carlos_tos

      My intention is to create a line chart with values in Y axis with 2 decimal places and X Axis must have week numbers with NO decimal places.

       

      If I create a chart  with this SELECT

       

      SELECT  '' link,1 week,40 value FROM dual

      UNION ALL

      SELECT  '' link,2 week,50.1 value FROM dual

      UNION ALL

      SELECT  '' link,3 week,30.2 value FROM dual

      UNION ALL

      SELECT  '' link,4 week,40.3 value FROM dual

      UNION ALL

      SELECT  '' link,5 week,50.9 value FROM dual

       

      In the AXIS setting there is a field stating "Decimal Places" if I click on this name I get the following help "Enter number of decimal places to use in Y Axis values."

       

      OK, so I put a 2 in here and my wish should be granted.

       

      But the X-AXIS also shows my week days with 2 decimal places.

       

      Can someone please help with what I can do to leave Y Axis with 2 decimal places and X axis with No decimal places.

       

      Thank you

      Carlos Santos

        • 1. Re: flash charts apex4.1, x-axis number with no decimal places
          Jeff E

          Edit the chart series and go down to the "Chart XML" options.

          Change "Use Custom XML" from "No" to "Yes"

          In the Custom XML that has been generated find the <x_axis> line and under that there will be a <format> line which defines the number of decimals for the X axis.  Change the numDecimals value from 2 to 0.

           

          
                    <x_axis>
                      <scale  mode="Normal"    />
                      <title>
                        <text>week</text>
                        <font family="Tahoma" size="14" color="0x000000" />
                      </title>
                      <labels enabled="true" position="Outside">
                        <font family="Tahoma" size="10" color="0x000000" />
                        <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
                      </labels>
                      <major_grid enabled="True" interlaced="false">
                          <line color="Black" />
                        </major_grid>
          <minor_grid enabled="True">
                        </minor_grid>
                     
                    </x_axis>