Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

I have created a cockpit with a line graph using only one dataset with one serie and two categories. The problem is that my serie also has negative values, but they are not shown in the graph unless I fix the minimum and maximum value.

I'm sending the image so you can see the problem.

Is there a way for the cockpit calculate the minimum value automatic for negative values as it does for positive values?

Thanks and regards.

Environment Knowage 6.1 Linux Debian
in Cockpit, Dashboard and Console by (310 points)

1 Answer

0 votes

Hi,

You need to specify min value for y axis 

If you do not have this option, try to update Knowage

by (3.3k points)
That is the problem. The value has a big range and if I define the min and max value the result will look bad and very difficult to analyze for low values. Is there a way for KnowAge to automatic calculate the min value the same way as it does to max value?
Try to set 0 for min, and please if you can attach here response of service readChartTemplateForCockpit

You can find it clicking on F12, then open Network tab, and find in list of services readChartTemplateForCockpit.

Here is the response of service readChartTemplateForCockpit:

https://www.knowage-suite.com/qa/?qa=blob&qa_blobid=750921489511839558

Any suggestions? I really need this to work. I'm using PostgreSQL. Can this be the problem?
I see in response that min is set to 0. Can you try to set some value that is less then 0? For now, we do not have dynamically count for min value.
If I manually set min value, the graph shows the negative values. The problem is that my negative range is huge and if I set minimum value as -2000000000, it will fit nice for some filters and it will be terrible for results with no negative values or low negative values.

I tried KnowAge CE and KnowAge EE. Both have the same problem. I tried set the minimum to zero or to let the minimum blank. Is this a Cockpit Problem? It cannot work with negative values?

Thanks.

Hi,

You can search for column)chart.vm on this path of your cockpit war:

knowagecockpitengine\WEB-INF\classes\chart\templates\highcharts414

Go around line 900, and remove this snippet:

#if($yAxis.min)

        #if($yAxis.min!=0)

             min: $yAxis.min,

        #end

#end

There was a line fixing min to zero when using line graphs:

                #if($chartType=="line")^M
                        min: 0,^M

I have just commented the line:

                        ##min: 0,^M

Thanks for the help. Excellent tip!

...