1.legend dynamic loading
Dynamic legend can not assign direct load time. Definition of variables required to build the object, and then assigned to option.legend = legend;
= Legend { Orient: ' Vertical ' , X: ' left ' , textStyle: { Color: " #fff " }, Data: [ ' highest price ( ' + 10000 + ' ) ' , ' the lowest ( ' + 1000 + ' ) ' ] };
2.series dynamic loading one of the objects
Series = [{ name: ' highest price ( ' + 10000 + ' ) ' , type: ' PIE ' , value: B, ItemStyle: { Normal: { Color: " # da2b80 " }, emphasis: { Color: " # da2b80 " } } }, { name: ' lowest (' + 1000+ ')', type: 'pie', value: c, itemStyle: { normal: { color: "#ffa600" }, emphasis: { color: "#ffa600" } } }]; option.series[0]['data'] = series;