Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Fusioncharts 如何在融合图的X轴上添加两行标签?_Fusioncharts - Fatal编程技术网

Fusioncharts 如何在融合图的X轴上添加两行标签?

Fusioncharts 如何在融合图的X轴上添加两行标签?,fusioncharts,Fusioncharts,其目的是为每个条在X轴上有2行文本。 e、 g 六月 2018年 并以不同的方式设置每行的样式(如将年份标签涂成绿色) 我们能做到吗? 这就是我以自定义方式填充栏的方式 str += '<set label="' + months[i].toUpperCase() + ' ' + currentyear + '" value="' + amount + '" color="08cf77" toolText="' + cur_symbol + amount + '" />\n';

其目的是为每个条在X轴上有2行文本。 e、 g
六月

2018年

并以不同的方式设置每行的样式(如将年份标签涂成绿色)

我们能做到吗? 这就是我以自定义方式填充栏的方式

str += '<set label="' + months[i].toUpperCase() + ' ' + currentyear + '" value="' + amount + '" color="08cf77" toolText="' + cur_symbol + amount + '"  />\n';
str+='\n';
只需使用

 '&#10;' 
因此,该行应更新为:

str += '<set label="' + months[i].toUpperCase() + '&#10;' + currentyear + '" value="' + amount + '" color="08cf77" toolText="' + cur_symbol + amount + '" />\n';
str+='\n';