如何在注释上设置不同的颜色?
问题描述:
我想给谷歌组合图上的注释提供不同的color
和auraColor
。任何人都可以说是否可行,以及如何?如何在注释上设置不同的颜色?
这是当前选项;
annotations: {
stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'white',
auraColor: 'grey',
fontSize: 11,
alwaysOutside: true,
}
},
此外,我已经尝试过,但它不工作;
annotations: {
0:{stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'white',
auraColor: 'grey',
fontSize: 11,
alwaysOutside: true
}},
1:{stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'black',
auraColor: 'red',
fontSize: 11,
alwaysOutside: true,
}},
2:{stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'blue',
auraColor: 'white',
fontSize: 11,
alwaysOutside: true,
}}
},
提前感谢使用series
选项
答
试...
series: {
0:{
annotations: {
stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'white',
auraColor: 'grey',
fontSize: 11,
alwaysOutside: true
}
}
},
1:{
annotations: {
stemColor: 'none',
textStyle: {
fontName: 'Arial',
color: 'black',
auraColor: 'red',
fontSize: 11,
alwaysOutside: true,
}
}
},
...
是的,这就是我要找的。谢谢 :) –