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.
Hi,
You need to specify min value for y axis
If you do not have this option, try to update Knowage
Here is the response of service readChartTemplateForCockpit:https://www.knowage-suite.com/qa/?qa=blob&qa_blobid=750921489511839558
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
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!