Charts periodValue not working

Hi

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:dataSets>
    ...
    </chart:dataSets>
    <chart:panelsSettings precision="-1" recalculateToPercents="NEVER"/>
    <chart:panels>
        <chart:panel id="stockpanel" categoryField="date">
            <chart:stockGraphs>
                <chart:stockGraph id="stockGraph"
                                  valueField="value" connect="false" periodValue="SUM"/>
            </chart:stockGraphs>
            <chart:stockLegend/>
            <chart:categoryAxis boldPeriodBeginning="true" parseDates="true"/>
        </chart:panel>
    </chart:panels>
    <chart:valueAxesSettings integersOnly="true"/>
    <chart:categoryAxesSettings groupToPeriods="WW" maxSeries="30" minPeriod="DD" />
    <chart:chartScrollbarSettings graph="stockGraph" updateOnReleaseOnly="false"/>
    <chart:dataSetSelector position="LEFT"/>
</chart:stockChart>

Hi,

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:
    image

  • In gradle project structure tab
    image

Regards,
Gleb

1 Like

Hi Gleb,

wonderful, thank you for this information!

Kind regards,
Martin Schmidt