[Geoserver-users] How to customize the scale of the graph in chart extension? rescale

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.

application/chart

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.


application/chart

The result bar chart is as below.

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

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.

daily_water_level.png

daily_water_level_b4.png

···

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 <khunsanaung.gis@anonymised.com> 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.

application/chart

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.


application/chart

The result bar chart is as below.

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



Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Have a nice day!

Mr. Khun San Aung

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.

daily_water_level.png

daily_water_level_b4.png

water_levels.png

···

On Mon, Aug 11, 2014 at 4:43 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

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

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 <khunsanaung.gis@anonymised.com> 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.

application/chart

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.


application/chart

The result bar chart is as below.

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



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Have a nice day!

Mr. Khun San Aung