Hi!
In order to use the legend
in the radarSeries
, you need to specify the data
and legend
in nativeJson
, this can be done programmatically using Java or declaratively using XML markup:
chart.setNativeJson("""
{
"legend": {
"show": true,
"data": ["Allocated Budget", "Actual Spending"]
},
"series": {
"type": "radar",
"data": [
{
"value": [4200, 3000, 20000, 35000, 50000, 18000],
"name": "Allocated Budget"
},
{
"value": [5000, 14000, 28000, 26000, 42000, 21000],
"name": "Actual Spending"
}]
}
}
""");
<charts:chart>
<charts:nativeJson>
<![CDATA[
{
"legend": {
"show": true,
"data": ["Allocated Budget", "Actual Spending"]
},
"series": {
"type": "radar",
"data": [
{
"value": [4200, 3000, 20000, 35000, 50000, 18000],
"name": "Allocated Budget"
},
{
"value": [5000, 14000, 28000, 26000, 42000, 21000],
"name": "Actual Spending"
}]
}
}
]]>
</charts:nativeJson>
</charts:chart>
Best regards,
Dmitriy