Thanks,
In the mean time, I was also exploring and finally I've got it to insert
variable in the numbers using *${Field_name} *.
The code is shared below, in case if someone would like to do similar
things using chart extension.

---
<ExternalGraphic>
  <OnlineResource
    xlink:href="http://chart?chxt=x,y,r&amp;chxl=2:|Below|Danger
Level|Above|1:|${dangrlevel-50}|${dangrlevel}|${dangrlevel+50}|0:|Danger|3|2|1|0&amp;cht=bvg&amp;chco=ff3333,3333ff,3333ff,3333ff,3333ff&amp;chf=bg,s,FFFFFF00&amp;chd=t:${dangrlevel/dangrlevel+50}|${last_3_day-dangrlevel+50}|${last_2_day-dangrlevel+50}|${last_1_day-dangrlevel+50}|${todayLevel-dangrlevel+50}&amp;chtt=Water
Level (cm)&amp;chs=250x150&amp;"/>
  <Format>application/chart</Format>
</ExternalGraphic>
---
the result is as below.

[image: Inline image 1]

Many thanks for your idea & support
Best regards
Mr. Khun San Aung



On Mon, Aug 11, 2014 at 4:43 PM, Jonathan Moules <
[email protected]> wrote:

> Hi,
> Maybe this is what you want:
>
> https://developers.google.com/chart/image/docs/gallery/bar_charts#axis_range
>
> Cheers,
> Jonathan
>
>
>
> On 11 August 2014 04:38, KhunSanAung <[email protected]> wrote:
>
>> 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&amp;chxl=0:|Danger|3|2|1|now|&amp;cht=bvg&amp;chco=ff0000,0000ff,0000ff,0000ff,0000ff&amp;chf=bg,s,FFFFFF00&amp;chd=t:${dangrlevel}|${last_3_day}|${last_2_day}|${last_1_day}|${todayLevel}&amp;chs=120x150&amp;chtt=Water
>> <http://chart?chxt=x,y&chxl=0:%7CDanger%7C3%7C2%7C1%7Cnow%7C&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:$%7Bdangrlevel%7D%7C$%7Blast_3_day%7D%7C$%7Blast_2_day%7D%7C$%7Blast_1_day%7D%7C$%7BtodayLevel%7D&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&amp;chxl=0:|Danger|3|2|1|now|&amp;cht=bvg&amp;chco=ff0000,0000ff,0000ff,0000ff,0000ff&amp;chf=bg,s,FFFFFF00&amp;chd=t:${dangrlevel/dangrlevel+50}|${last_3_day-dangrlevel+50}|${last_2_day-dangrlevel+50}|${last_1_day-dangrlevel+50}|${todayLevel-dangrlevel+50}&amp;chs=120x150&amp;chtt=Water
>> <http://chart?chxt=x,y&chxl=0:%7CDanger%7C3%7C2%7C1%7Cnow%7C&cht=bvg&chco=ff0000,0000ff,0000ff,0000ff,0000ff&chf=bg,s,FFFFFF00&chd=t:$%7Bdangrlevel/dangrlevel+50%7D%7C$%7Blast_3_day-dangrlevel+50%7D%7C$%7Blast_2_day-dangrlevel+50%7D%7C$%7Blast_1_day-dangrlevel+50%7D%7C$%7BtodayLevel-dangrlevel+50%7D&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/>*
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Geoserver-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
> This transmission is intended for the named addressee(s) only and may
> contain confidential, sensitive or personal information and should be
> handled accordingly. Unless you are the named addressee (or authorised to
> receive it for the addressee) you may not copy or use it, or disclose it to
> anyone else. If you have received this transmission in error please notify
> the sender immediately. All email traffic sent to or from us, including
> without limitation all GCSX traffic, may be subject to recording and/or
> monitoring in accordance with relevant legislation.




-- 
Have a nice day!
--

*Mr. Khun San Aung*
* <http://geoportal.icimod.org/>*
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to