steth
09-24-2007, 10:03 AM
I make the following columnchart that include the defaulchartstyle.lzx.
<canvas height="450" width="800" debug="true">
<include href="charts/styles/defaultchartstyle.lzx"/>
<dataset name="aperti" src="R02SODHB_Pdv(Puntivenditaaperti).jsp" request="true" type="http"/>
<simplelayout axis="y"/>
<!-- Chart Title -->
<view name="title" y="10">
<text x="100" font="serif" fontsize="15" fontstyle="bold" fgcolor="0x0000FF">Confronto del valore del venduto con l'anno precedente</text>
</view>
<!-- Column Chart -->
<columnchart id="chart1" y="40" width="900" height="400" datatipEnabled="true" datatipColumn="tooltip" datalabelEnabled="true" datalabelColumn="label" horizontalGridLines="true" rightMargin="30" style="defaultchartstyle">
<dataseries datapath="aperti:/PuntidiVendita[1]">
<datacolumn name="x" columndatapath="PuntodiVendita/@cli_sigla_des" datatype="string"/>
<datacolumn name="label" columndatapath="PuntodiVendita/@cli_sigla_des"/>
<dataseries name="2" label="valore_att">
<datacolumn name="y" columndatapath="PuntodiVendita/@val_vend1" datatype="number"/>
<datacolumn name="tooltip" columndatapath="PuntodiVendita">
<method name="processData" args="v">
return "Pdv: " + v.attributes.cli_sigla_des + " anno attuale: " + v.attributes.val_vend1;
</method>
</datacolumn>
</dataseries>
<dataseries name="1" label="valore_prec">
<datacolumn name="y" columndatapath="PuntodiVendita/@val_vend2" datatype="number"/>
<datacolumn name="tooltip" columndatapath="PuntodiVendita" >
<method name="processData" args="v">
return "Pdv: " + v.attributes.cli_sigla_des + " anno passato: " + v.attributes.val_vend2;
</method>
</datacolumn>
</dataseries>
</dataseries>
<columnchartplotarea name="columnchartplotarea" clip="true"/>
<horizontalaxis title="Punti di vendita" titleLocation="low" name="haxis" type="categorical" columnName="x">
</horizontalaxis>
<verticalaxis name="vaxis" type="linear" columnName="y" interval="1000000">
</verticalaxis>
</columnchart>
<legend name="legendbox" legendFontsize="14" legendborder="true"
chart="${chart1}" x="${(chart1.x + chart1.width)/2}" y="${(chart1.y + chart1.height)}" options="ignorelayout" fillColor="0xe0ffff" borderWidth="2">
<method event="onitemmouseclick" args="item">
var topseries = this.chart.getDataSeries();
topseries.getDataSeries(item.identifier).enabled = item.linevisible;
this.chart.renderPlotArea();
item.linevisible = !item.linevisible;
</method>
</legend>
</canvas>
I modified the file defaultchartstyle.lzx changing the values of the attribute fontcolor and adding the attribute fontangle like this:
<axisstyle name="haxisstyle">
<labelstyle name="label" font="Helmet" fontsize="16" fontcolor="0x000000" fontangle="0"/>
<tickstyle name="tickmajor" color="0x000000" position="outside" length="3" size="1">
<labelstyle name="label" font="serif" fontstyle="bold" fontsize="12" fontcolor="0x00ff00" fontangle="90" />
</tickstyle>
<tickstyle name="tickminor" color="0xD3D3D3" position="outside" length="3" size="1"/>
<linestyle name="axisline" color="0x000000" size="1"/>
<linestyle name="gridline" color="0xD3D3D3" size="1"/>
</axisstyle>
the color is changing but the angle of the font doesn't change ... why?!
thank you!!
<canvas height="450" width="800" debug="true">
<include href="charts/styles/defaultchartstyle.lzx"/>
<dataset name="aperti" src="R02SODHB_Pdv(Puntivenditaaperti).jsp" request="true" type="http"/>
<simplelayout axis="y"/>
<!-- Chart Title -->
<view name="title" y="10">
<text x="100" font="serif" fontsize="15" fontstyle="bold" fgcolor="0x0000FF">Confronto del valore del venduto con l'anno precedente</text>
</view>
<!-- Column Chart -->
<columnchart id="chart1" y="40" width="900" height="400" datatipEnabled="true" datatipColumn="tooltip" datalabelEnabled="true" datalabelColumn="label" horizontalGridLines="true" rightMargin="30" style="defaultchartstyle">
<dataseries datapath="aperti:/PuntidiVendita[1]">
<datacolumn name="x" columndatapath="PuntodiVendita/@cli_sigla_des" datatype="string"/>
<datacolumn name="label" columndatapath="PuntodiVendita/@cli_sigla_des"/>
<dataseries name="2" label="valore_att">
<datacolumn name="y" columndatapath="PuntodiVendita/@val_vend1" datatype="number"/>
<datacolumn name="tooltip" columndatapath="PuntodiVendita">
<method name="processData" args="v">
return "Pdv: " + v.attributes.cli_sigla_des + " anno attuale: " + v.attributes.val_vend1;
</method>
</datacolumn>
</dataseries>
<dataseries name="1" label="valore_prec">
<datacolumn name="y" columndatapath="PuntodiVendita/@val_vend2" datatype="number"/>
<datacolumn name="tooltip" columndatapath="PuntodiVendita" >
<method name="processData" args="v">
return "Pdv: " + v.attributes.cli_sigla_des + " anno passato: " + v.attributes.val_vend2;
</method>
</datacolumn>
</dataseries>
</dataseries>
<columnchartplotarea name="columnchartplotarea" clip="true"/>
<horizontalaxis title="Punti di vendita" titleLocation="low" name="haxis" type="categorical" columnName="x">
</horizontalaxis>
<verticalaxis name="vaxis" type="linear" columnName="y" interval="1000000">
</verticalaxis>
</columnchart>
<legend name="legendbox" legendFontsize="14" legendborder="true"
chart="${chart1}" x="${(chart1.x + chart1.width)/2}" y="${(chart1.y + chart1.height)}" options="ignorelayout" fillColor="0xe0ffff" borderWidth="2">
<method event="onitemmouseclick" args="item">
var topseries = this.chart.getDataSeries();
topseries.getDataSeries(item.identifier).enabled = item.linevisible;
this.chart.renderPlotArea();
item.linevisible = !item.linevisible;
</method>
</legend>
</canvas>
I modified the file defaultchartstyle.lzx changing the values of the attribute fontcolor and adding the attribute fontangle like this:
<axisstyle name="haxisstyle">
<labelstyle name="label" font="Helmet" fontsize="16" fontcolor="0x000000" fontangle="0"/>
<tickstyle name="tickmajor" color="0x000000" position="outside" length="3" size="1">
<labelstyle name="label" font="serif" fontstyle="bold" fontsize="12" fontcolor="0x00ff00" fontangle="90" />
</tickstyle>
<tickstyle name="tickminor" color="0xD3D3D3" position="outside" length="3" size="1"/>
<linestyle name="axisline" color="0x000000" size="1"/>
<linestyle name="gridline" color="0xD3D3D3" size="1"/>
</axisstyle>
the color is changing but the angle of the font doesn't change ... why?!
thank you!!