bleugirl
12-29-2005, 09:07 AM
Has anyone else encountered this?
Following the code from lps/components/charts/test/integral/columnchart/test_column_03.lzx the graph looks beautiful, but it renders incorrectly when there is only one element returned in the datapath.
There are no debuggin errors, it looks like Laszlo is trying to render a negative number, and display 5 columns.
Any ideas?
Attached is an image of the column charts, and here is the code snippet:
<!-- load data -->
<!-- disply column chart -->
<columnchart id="chart"
width="${classroot.width}"
height="300"
datatipEnabled="true"
datatipColumn="tooltip"
style="defaultchartstyle03"
datalabelEnabled="false"
datalabelColumn="label">
<dataseries datapath="unit_data:/linked-list">
<datacolumn name="x"
columndatapath="type/mtype/text()"/>
<dataseries label="total">
<datacolumn name="y"
columndatapath="type/total/text()" datatype="number"/>
</dataseries>
</dataseries>
<columnchartplotarea name="plotarea"
clip="true"/>
<horizontalaxis name="haxis"
title="Type"
type="categorical"
columnName="x"
titleLocation="low"
majorTickEnabled="false"
minorTickEnabled="false">
</horizontalaxis>
<verticalaxis name="vaxis"
title="Total"
type="linear"
columnName="y"
minimum="0"
maximum="120"
titleLocation="low"
minorTickEnabled="false"
labelrotation="vertical">
</verticalaxis>
</columnchart>
Sample returned datapath when two elements:
<linked-list>
<type>
<mtype>M 2</mtype>
<total>2</total>
</type>
<type>
<mtype>M 3</mtype>
<total>1</total>
</type>
</linked-list>
Sample returned datapath when a single element:
<linked-list>
<type>
<mtype>M 2</mtype>
<total>2</total>
</type>
</linked-list>
Following the code from lps/components/charts/test/integral/columnchart/test_column_03.lzx the graph looks beautiful, but it renders incorrectly when there is only one element returned in the datapath.
There are no debuggin errors, it looks like Laszlo is trying to render a negative number, and display 5 columns.
Any ideas?
Attached is an image of the column charts, and here is the code snippet:
<!-- load data -->
<!-- disply column chart -->
<columnchart id="chart"
width="${classroot.width}"
height="300"
datatipEnabled="true"
datatipColumn="tooltip"
style="defaultchartstyle03"
datalabelEnabled="false"
datalabelColumn="label">
<dataseries datapath="unit_data:/linked-list">
<datacolumn name="x"
columndatapath="type/mtype/text()"/>
<dataseries label="total">
<datacolumn name="y"
columndatapath="type/total/text()" datatype="number"/>
</dataseries>
</dataseries>
<columnchartplotarea name="plotarea"
clip="true"/>
<horizontalaxis name="haxis"
title="Type"
type="categorical"
columnName="x"
titleLocation="low"
majorTickEnabled="false"
minorTickEnabled="false">
</horizontalaxis>
<verticalaxis name="vaxis"
title="Total"
type="linear"
columnName="y"
minimum="0"
maximum="120"
titleLocation="low"
minorTickEnabled="false"
labelrotation="vertical">
</verticalaxis>
</columnchart>
Sample returned datapath when two elements:
<linked-list>
<type>
<mtype>M 2</mtype>
<total>2</total>
</type>
<type>
<mtype>M 3</mtype>
<total>1</total>
</type>
</linked-list>
Sample returned datapath when a single element:
<linked-list>
<type>
<mtype>M 2</mtype>
<total>2</total>
</type>
</linked-list>