Hello,
I'm trying to create a line chart with a categorical horizontal axis.
When I do that, the vertical data doesn't seem to be related to the
horizontal data anymore and
is drawn at the left-hand side of the chart. Can anybody show me a
working example, or show me the error in my code?
Thanks in advance,
Bas Velthuizen
-- code --
<?xml version="1.0" ?>
<canvas
width="1000"
height="900"
debug="true">
<dataset name="history">
<records>
<record
order="-23"
time="00:00"
value="0" />
<record
order="-22"
time="01:00"
value="0" />
<record
order="-21"
time="02:00"
value="0" />
<record
order="-20"
time="03:00"
value="0" />
<record
order="-19"
time="04:00"
value="0" />
<record
order="-18"
time="05:00"
value="0" />
<record
order="-17"
time="06:00"
value="0" />
<record
order="-16"
time="07:00"
value="4" />
<record
order="-15"
time="08:00"
value="12" />
<record
order="-14"
time="09:00"
value="1200" />
<record
order="-13"
time="10:00"
value="3500" />
<record
order="-12"
time="11:00"
value="2456" />
<record
order="-11"
time="12:00"
value="4700" />
<record
order="-10"
time="13:00"
value="6900" />
<record
order="-9"
time="14:00"
value="5783" />
<record
order="-8"
time="15:00"
value="3478" />
<record
order="-7"
time="16:00"
value="2473" />
<record
order="-6"
time="17:00"
value="5845" />
<record
order="-5"
time="18:00"
value="7982" />
<record
order="-4"
time="19:00"
value="6300" />
<record
order="-3"
time="20:00"
value="3400" />
<record
order="-2"
time="21:00"
value="178" />
<record
order="-1"
time="22:00"
value="12" />
<record
order="-0"
time="23:00"
value="0" />
</records>
</dataset>
<linechart
id="chart1"
y="60"
width="640"
height="480"
bottomMargin="40"
dataPointsEnabled="true"
horizontalGridLines="true"
verticalGridLines="true"
>
<dataseries
name="series1"
datapath="history:/records">
<dataseries
label="present"
name="present">
<datacolumn
name="x1"
columndatapath="record/@time"
datatype="string" />
<datacolumn
name="y"
columndatapath="record/@value"
datatype="number" />
</dataseries>
</dataseries>
<horizontalaxis
name="haxis"
title="time"
columnName="x1"
type="categorical"
titleLocation="low"
tickMarksLabelsEnabled="true" />
<verticalaxis
name="vaxis"
title="present"
columnName="y"
type="linear"
minimum="0"
titleLocation="low" />
</linechart>
</canvas>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user