So I tried to make a chart, with a blank screen based this tutorial. But when I run the project, the chart doesn’t appear. I did everything like in the tutorial, only I missed the
from xml, because if I put that in, I got an Exception:
GuiDevelopmentException: Unknown component: legend
Frame ID: SzaarChart
XML descriptor: com/company/gdpr/web/szemely_adata_a_rendszerben/SzaarChart.xml
From your code, I see that you didn’t specify titleField and valueField for pieChart. ‘titleField’ is used to specify which attribute will be used for slice titles, valueField is used to specify which attribute will be used for slice values. You can read more about charts in the documentation and our samples.
CUBA chart display subsystem is based on AmCharts library and it’s more convenient to get information about chart’s fields designation from original AmCharts documentation. We also have charts documentation, but our documentation mainly focused on providing information about how to use charts inside CUBA application and how to port JSON configuration to CUBA way using XML and Java code.
In the tutorial you’ve mentioned, I see that chart configuration has titleField and valueField attributes. But, probably, it’s not obvious that you need to use them too. We will think about it. Thanks for your feedback.