Charts periodValue not working


has anyone yet tried to set periodValue on a StockCharts stockGraph in Platform 7.0.2?
I tried it now with an absolute minimalistic example. As soon as periodValue is set to something, no data is shown at all. Doesn’t matter if it’s SUM or CLOSE (default). If it’s not set, the default (CLOSE) is used.
Setting it in the controller via setPeriodValue() shows same behavior.

Dirty little workaround that works is setting the native json like:

stockChart.setNativeJson("{\"panels\": [ { \"id\": \"stockpanel\", \"stockGraphs\": [ { \"id\": \"stockGraph\", \"periodValue\": \"Sum\" } ] } ] } ");

Am I missing another required parameter? Is it a bug?

Kind regards,
Martin Schmidt

Btw: How do I find out, which exact amCharts version is used by Cuba?

here’s my minimalistic example:

<chart:stockChart id="stockChart" mainDataSet="mainset" height="100%" theme="LIGHT" width="100%"
              extendToFullPeriod="true" processTimeout="20">
    <chart:panelsSettings precision="-1" recalculateToPercents="NEVER"/>
        <chart:panel id="stockpanel" categoryField="date">
                <chart:stockGraph id="stockGraph"
                                  valueField="value" connect="false" periodValue="SUM"/>
            <chart:categoryAxis boldPeriodBeginning="true" parseDates="true"/>
    <chart:valueAxesSettings integersOnly="true"/>
    <chart:categoryAxesSettings groupToPeriods="WW" maxSeries="30" minPeriod="DD" />
    <chart:chartScrollbarSettings graph="stockGraph" updateOnReleaseOnly="false"/>
    <chart:dataSetSelector position="LEFT"/>


Thank you for reporting the issue. The problem is that periodValue is serialized in lower case, but this particular attribute has values starting with capital letters (unlike all the others), e.g. sum is used instead of Sum. I’ve created a GitHub issue.

AmCharts version can be found in the following ways:

  • In the external libraries section of the project tree:

  • In gradle project structure tab


1 Like

Hi Gleb,

wonderful, thank you for this information!

Kind regards,
Martin Schmidt