I am implementing a scatterplot using echarts library by baidu. I am referring to this example. I have made modifications in its properties according to my requirement. I have increased the bubble size by mentioning a symbol size in 'series' like this:
series : [
{
symbolSize : 20,
type :'scatter',
data : [ some coordinate values ],
.
. //rest of the properties
.
},
]
I have done this to include customized labels inside the bubbles. For this, I have modified the 'itemStyle' in 'series' as follows:
itemStyle: {
normal: {
color:'blue',
label:{
textStyle:{
fontWeight:'bold',
fontSize:15
},
show:true,
position: 'inside',
formatter: function(value)
{
if (value=='[10][20]')
return 'some label'
else
return 'NA'
}
}
}
},
All the bubbles now have 'NA' written inside them. So, I realize I am not doing it correctly. I want to know what does the 'value' contain in the formatter function. Will I be able to check its equality with the coordinates in the data? Please help.
This is how the points look as of now:
PS: The value element in formatter function of label in series is always UNDEFINED