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
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.
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?
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.