PDA

View Full Version : Date formatting in charts



paolopan83
09-29-2008, 05:30 AM
Hi,

I am building an xaction to show plots. I have a funny problems with x axis labels. On a debian stable 32bit system I get lables like "20/11 10.00" while on a Red Hat x64 5.2 I get labels like "20-Nov, 10:00". I made some test on several Deian and RH systems and the result is always the same. I think it can be something relted to locals, but I actually have no clue about what is the reason and possibly the solution.

The xaction definition is following. Data is fetched from an Oracle db and x axis label data is defined as date.

Thnx
Paolo

<action-definition>
<component-name>ChartComponent</component-name>
<action-type>Line Chart</action-type>
<action-inputs>
<width type="long" mapping="cwidth"/>
<height type="long" mapping="cheight"/>
<title type="string" mapping="gtitle"/>
<chart-data type="result-set" mapping="ChartData"/>
</action-inputs>
<action-outputs>
<chart-filename type="string"/>
<base-url type="string"/>
<image-tag type="string"/>
</action-outputs>
<component-definition>
<chart-attributes>
<dataset-type>TimeSeriesCollection</dataset-type>
<chart-type>LineChart</chart-type>
<border-visible>false</border-visible>
<range-maximum>100</range-maximum>
<range-minimum>-1</range-minimum>
<domain-vertical-tick-labels>true</domain-vertical-tick-labels>
<rangeStickyZero>false</rangeStickyZero>
<rangeIncludesZero>true</rangeIncludesZero>
<markers-visible>false</markers-visible>
<tooltip-content>{0} {1}: {2}</tooltip-content>
<tooltip-x-format>dd/MM/yyyy HH:mm</tooltip-x-format>
<tooltip-y-format>#.###</tooltip-y-format>
<url-template><![CDATA[#]]></url-template>
<use-base-url>false</use-base-url>
<url-target>_self</url-target>
<include-legend>false</include-legend>
<expression name="field_nameChart" class="org.pentaho.plugin.jfreereport.reportcharts.BarChartExpression">
<properties>
<property name="categoricalLabelFormat">{2}</property>
</properties>
</expression>
<color-palette>
<color>#FF0000</color>
[...]
</color-palette>
<title-font>
<size>10</size>
<is-bold>false</is-bold>
<font-family>Verdana</font-family>
</title-font>
</chart-attributes>
<by-row>false</by-row>
</component-definition>
</action-definition>