Can't find getter for property in LineChart

I want to build line chart by datasiurce, but when i try to get relation property from item then get exception
java.lang.IllegalArgumentException: Can’t find getter for property

Sample xml code:

<chart:graph fillAlphas="0.7"
         ** valueField="company.kir.greenZone"/>**

How i can read this propery?


To bind a chart with a datasource you need to set the datasource attribute to a proper datasource and assign attributes like valueField with just an entity attribute name without any package information, for example:

<chart:graph id="g1"

You can find several chart samples in our Sampler app.



Hello Gleb!
I know that i can access to simple item of datasource ,but my question is in another.
I have entity KirCompany with relation to another entity Kir

public class KirCompany extends StandardEntity {
    @Column(name = "NAME", length = 512)
    protected String name;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "KIR_ID")
    protected Kir kir;

And i want to display in a chart, atribute of entity KirCompany.getKir()…
How can do it without creating a separate DataProvider?

Thank you


I get it now. So, currently this can’t be reached from XML ant it’s a bug (see the issue PL-8802), but you can use ListDataProvider with MapDataItems from a java code or use valueDatasource. In Sampler app, there are samples for both value datasource and ListDataProvider with MapDataItems.