Can't find getter for property in LineChart

Hello!
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"
             lineAlpha="0.3"
             title="Value"
         ** valueField="company.kir.greenZone"/>**

How i can read this propery?

Hello,

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"
			 valueField="value">
...

You can find several chart samples in our Sampler app.

Regards,

Gleb

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

Hi,

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.

Regards,

Gleb