Hi List, I'd like to show daily water level by bar chart. Danger level has fixed value (red color), daily water levels are changing (in blue color). I'm using the chart extension for visualization of attribute data ( dangrlevel, last_3_day, last_2_day, last_1_day, todayLevel). The SLD rules that use the attribute data without any change and the results are as below screenshots.
<ExternalGraphic>
<OnlineResource
xlink:href="
http://chart?chxt=x,y&chxl=0:|Danger|3|2|1|now|&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:${dangrlevel}|${last_3_day}|${last_2_day}|${last_1_day}|${todayLevel}&chs=120x150&chtt=Water
Level" />
<Format>application/chart</Format>
</ExternalGraphic>
[image: Inline image 2]
The X-axis is okay, but the resultant bar chart range from 0 to 100 only in
the Y-axis. I'm not sure whether it is a percentage or not.
But the value in the attribute data are range more than 100. which is not
appearing well in the graph.
So I've modified the SLD as followed to get the comparison between danger
level and daily water level.
<ExternalGraphic>
<OnlineResource
xlink:href="
http://chart?chxt=x,y&chxl=0:|Danger|3|2|1|now|&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:${dangrlevel/dangrlevel+50}|${last_3_day-dangrlevel+50}|${last_2_day-dangrlevel+50}|${last_1_day-dangrlevel+50}|${todayLevel-dangrlevel+50}&chs=120x150&chtt=Water
Level" />
<Format>application/chart</Format>
</ExternalGraphic>
The result bar chart is as below.
[image: Inline image 1]
I've got the barchart value that I wanted to show. but the default scale
for Y axis is from 0 to 100. which is not the scale I wanted.
I wanted to show the actual range in the Y-axis , danger level 700 cm, so
the chart should range from 650 to 750 cm.
My question is, " *How can I change the range of the Y-axis to a certain
column?*"
Thank you very much in advanced for any help.
Best regards
--
Have a nice day!
--
*Mr. Khun San Aung*
* <http://geoportal.icimod.org/>*
Hi List,
I'd like to show daily water level by bar chart. Danger level has fixed value (red color), daily water levels are changing (in blue color).
I'm using the chart extension for visualization of attribute data (dangrlevel, last_3_day, last_2_day, last_1_day, todayLevel).
The SLD rules that use the attribute data without any change and the results are as below screenshots.
<ExternalGraphic>
<OnlineResource
xlink:href="http://chart?chxt=x,y&chxl=0:|Danger|3|2|1|now|&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:${dangrlevel}|${last_3_day}|${last_2_day}|${last_1_day}|${todayLevel}&chs=120x150&chtt=Water Level" />
<Format>application/chart</Format>
</ExternalGraphic>
<OnlineResource
xlink:href="http://chart?chxt=x,y&chxl=0:|Danger|3|2|1|now|&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:${dangrlevel}|${last_3_day}|${last_2_day}|${last_1_day}|${todayLevel}&chs=120x150&chtt=Water Level" />
<Format>application/chart</Format>
</ExternalGraphic>
The X-axis is okay, but the resultant bar chart range from 0 to 100 only in the Y-axis. I'm not sure whether it is a percentage or not.
But the value in the attribute data are range more than 100. which is not appearing well in the graph.
So I've modified the SLD as followed to get the comparison between danger level and daily water level.
<ExternalGraphic>
<OnlineResource
xlink:href="http://chart?chxt=x,y&chxl=0:|Danger|3|2|1|now|&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:${dangrlevel/dangrlevel+50}|${last_3_day-dangrlevel+50}|${last_2_day-dangrlevel+50}|${last_1_day-dangrlevel+50}|${todayLevel-dangrlevel+50}&chs=120x150&chtt=Water Level" />
<Format>application/chart</Format>
</ExternalGraphic>
<OnlineResource
xlink:href="http://chart?chxt=x,y&chxl=0:|Danger|3|2|1|now|&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:${dangrlevel/dangrlevel+50}|${last_3_day-dangrlevel+50}|${last_2_day-dangrlevel+50}|${last_1_day-dangrlevel+50}|${todayLevel-dangrlevel+50}&chs=120x150&chtt=Water Level" />
<Format>application/chart</Format>
</ExternalGraphic>
The result bar chart is as below.
I've got the barchart value that I wanted to show. but the default scale for Y axis is from 0 to 100. which is not the scale I wanted.
I wanted to show the actual range in the Y-axis , danger level 700 cm, so the chart should range from 650 to 750 cm.
My question is, " How can I change the range of the Y-axis to a certain column?"
Thank you very much in advanced for any help.
Best regards
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
