stockGraphs problem comparison

Hi all,
I have a problem with the stockGraphs, when I enabled the second series in the graph the y-axis change from the absolute value to percent value, I would compare the series on the absolute values. Where I can change this property?

This is the graph:

       <collection id="stockChartDc1" class="DateValue" view="_local"/>
       <collection id="stockChartDc2" class="DateValue" view="_local"/>        

    <chart:stockChart id="stockChart" height="100%" width="100%">
            <chart:dataSet id="dataSet1" categoryField="date"
                           dataContainer="stockChartDc1" title="Serie 1">
                     <chart:fieldMapping fromField="value" toField="value"/>

            <chart:dataSet id="dataSet2" categoryField="date"
                               dataContainer="stockChartDc2" title="Serie 2">
                     <chart:fieldMapping fromField="value" toField="value"/>

                 <chart:panel percentHeight="100" showCategoryAxis="false" title="Value">
                          <chart:stockGraph id="stockGraph"
                      <chart:stockLegend valueTextComparing="[[value]]"/>
              <chart:chartScrollbarSettings graph="stockGraph"/>

This is the obj DateValue:

public class DateValue extends BaseUuidEntity {
    @MetaProperty(mandatory = true)
    protected Date date;

    @MetaProperty(mandatory = true)
    protected Long value;

A secondary question is how can load both series on default? I see that there’s “mainDataSet” property for the chart, but can I set two o more series for that property?

Thanks in advance

Hello Francesco,

  1. To compare absolute values set recalculateToPercents="false" in the <chart:panel> element. (doc link)

  2. If I understand you correctly, you want two compare two series when screen is loaded by default. You can set compared="true" (doc link):

    <chart:dataSet id="dataSet2"

Thanksss @Pinyazhin It’s works

Hi @Pinyazhin, I have another question on the stock graph, If the two dataset contains one obj for each day the graph is displayed correctly:


Instead if I insert in the dataset for example two obj for one day the graph doesn’t change the x-axis range (I would have expected to see the hours of the day as well):
These are the date for the two obj for the day 2020-10-19:

2020-10-19 12:27:00
2020-10-19 17:27:00

2020-10-19 16:27:00
2020-10-19 19:27:00


There’s a way to force the change x-axis range?
thanks as always

Hello Francesco,

You could try to use minPeriod for the category axis:

<chart:categoryAxesSettings minPeriod="mm"/>

It will show minutes if you select a small range of scrollbar.