This discussion is archived
2 Replies Latest reply: Dec 5, 2012 8:26 AM by 560962 RSS

Ways to get rid of the thousands separator on X axis of Flash chart

560962 Newbie
Currently Being Moderated
Hi all,

I need to display data as 3D columns in a flash chart. Two issues with this:

1) The X axis is year values, stored originally just as numbers 2009, 2010, 2011 etc.

The chart automatically displayed the years on X axis as 2,009 2,010 2,011 ... somewhat unusual for display of years

The only way I found to remove the thousands separator is to use the custom XML and change the X axis default format from
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format> to
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.}]]></format>

...but the custom XML only has 2D columns, not 3D. I tried selecting the year as string or a date.
select ... to_date(year,'YYYY') as label ...
gives values like 01-NOV-12 ... and select ... to_char(to_date(year,'YYYY'),'YYYY') or just to_char(year) or year||' ' gives back the 2,012 display.

There is a control allowing to select decimal places, but not the thousands separator. Years on X axis should be a pretty trivial case, is there something I'm missing?

2) The other issue is that I'm embedding some item values into the chart region title using the &ITEM_NAME. syntax and they work OK. But if I try to use the same item values in the chart title or axis labels, the values date back from last page reload and not from current values, as if the chart is rendered before the page itself and the values come from the cache. Is there any known workaround for this?
Regards,
Atanas
  • 1. Re: Ways to get rid of the thousands separator on X axis of Flash chart
    714270 Pro
    Currently Being Moderated
    atanask wrote:
    Hi all,

    I need to display data as 3D columns in a flash chart. Two issues with this:

    1) The X axis is year values, stored originally just as numbers 2009, 2010, 2011 etc.

    The chart automatically displayed the years on X axis as 2,009 2,010 2,011 ... somewhat unusual for display of years

    The only way I found to remove the thousands separator is to use the custom XML and change the X axis default format from
    <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format> to
    <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.}]]></format>

    ...but the custom XML only has 2D columns, not 3D. I tried selecting the year as string or a date.
    select ... to_date(year,'YYYY') as label ...
    gives values like 01-NOV-12 ... and select ... to_char(to_date(year,'YYYY'),'YYYY') or just to_char(year) or year||' ' gives back the 2,012 display.

    There is a control allowing to select decimal places, but not the thousands separator. Years on X axis should be a pretty trivial case, is there something I'm missing?
    How about leaving the thousands separator to blank. So, try changing this:
    <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
    to
     <format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:}]]></format>
    2) The other issue is that I'm embedding some item values into the chart region title using the &ITEM_NAME. syntax and they work OK. But if I try to use the same item values in the chart title or axis labels, the values date back from last page reload and not from current values, as if the chart is rendered before the page itself and the values come from the cache. Is there any known workaround for this?
    Few things that you can look for... How is the value of ITEM_NAME being set? Before/after page header process? If in Apex 4.x, make sure you have included the page item ITEM_NAME in the "Page Items to Submit" list (under Chart Attributes). Also, try changing the page item's "Source Used" to "Always, replacing any values in session state".
  • 2. Re: Ways to get rid of the thousands separator on X axis of Flash chart
    560962 Newbie
    Currently Being Moderated
    Hi Rohit,
    Leaving the separator blank worked, thank you. But for the item issue: I used the very same &ITEM_NAME. in the chart region title and in the chart title itself (or on the chart axis). The item is correctly rendered in the region title, but in the chart it is always a page back. Only when I submit the page again without changing anything the two titles are synced.
    Regards,
    Atanas

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points