[Logo] SpagoWorld Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
[Groups] Back to home page  [Moderation Log] Moderation Log   [Register] Register /  [Login] Login 
Max. value of the Y axis not properly calculated  XML
Forum Index » Technical Help - SpagoBI Server - CHART & DASH
Author Message
rider21.spw

Newby

Joined: 19/10/2011 17:44:53
Messages: 12
Offline

Hello everyone,

Does anyone know how to adjust the max. value of the Y axis without putting the option max='xx' ??

In my case, I've got a chart with a max. value of 5 for the Y axis, but if i don't put the option max='7' for example, the max value goes up to 70, which is too much for my set of values, and the chart doesn't look very nice then.

Thanks in advance,

Regards
hemgoyal.spw

SpagoBI friend

Joined: 07/09/2011 17:35:07
Messages: 89
Offline

Which library you are using - JFree Chart or HighCharts ?

rider21.spw

Newby

Joined: 19/10/2011 17:44:53
Messages: 12
Offline

Hello,

I'm using HighChart library.
hemgoyal.spw

SpagoBI friend

Joined: 07/09/2011 17:35:07
Messages: 89
Offline

As per Highchart documentation, max parameter is optional and if it is not set, max value is automatically calculated

max:
"The maximum value of the axis. If null, the max value is automatically calculated. If the endOnTick option is true, the max value might be rounded up. The actual maximum value is also influenced by chart.alignTicks. Defaults to null."

You can refer highchart parameters here:

http://www.highcharts.com/ref/

Thanks.
rider21.spw

Newby

Joined: 19/10/2011 17:44:53
Messages: 12
Offline

Thanks for replying.

Yes I already read the documentation before and tried many changes. The thing is that when using a query type data set i don't have that problem, but now I'm using a javaclass data set (because it allows me to add restrictions much more easy than sql), and I get higher values in the y axis. In my case, the max value for the y axis is 4, and when generating the chart the y axis goes up to 70, so if i don't restrict the values by myself, the chart doesn't look good at all.

I don't know if it's a bug or problem with the java class data set, or if I'm doing something wrong, but I'm using the exact xml template to generate the charts.
giachino

SpagoBI hero
[Avatar]

Joined: 05/07/2010 15:41:54
Messages: 355
Location: Turin, Italy
Offline

Hi rider21,
could you post your template? Did you try to set the max value for the axis ?

Are you sure that the java class returns a number value for the series?
The result given by the query is the same of the java class (in the form)?...Eventually, could you post an example of the data returned by the java class.

Thank you,

Antonella

Antonella Giachino
SpagoBI Consultant
[Email]
rider21.spw

Newby

Joined: 19/10/2011 17:44:53
Messages: 12
Offline

Hello Antonella,

This the template I'm using:



I've already set the max values for the first y axis and second y axis for this chart, in fact, If i don't set the max value for the second Y axis, the last two series won't appear on the chart.

The result given by the query is almost the same as the java class, the java class one has more restrictions, but i don't think it'll affect to the chart.

Thanks again,

Felix.

rider21.spw

Newby

Joined: 19/10/2011 17:44:53
Messages: 12
Offline

And here you have a sample of my data:

Image and video hosting by TinyPic

This message was edited 3 times. Last update was at 21/11/2011 14:24:48

 
Forum Index » Technical Help - SpagoBI Server - CHART & DASH
Go to:   
Powered by JForum 2.1.9 © JForum Team