svg - Highcharts 导出服务器不导出标签
问题描述
演示:https ://jsfiddle.net/L6ca89dh/4/
当我导出(单击汉堡包并单击导出 SVG)时,数据标签显示正常。
当我使用我的 highcharts-export-server 时,它们不会:
*** 这是应该的样子:
图表项的代码片段
var chart = {
title: {
text: null
},
time: {
useUTC: false
},
chart: {
width: 1200,
height: 600,
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false,
spacing: 0,
type: 'spline'
},
xAxis: {
//startOnTick: true
},
yAxis: {
title: {
text: 'Performance (%)'
},
//min: 0
},
legend: {
enabled: true,
navigation: false,
itemStyle: {"fontSize": "11px", "fontWeight": "normal"}
},
rangeSelector: {
enabled: false
},
scrollbar: {
enabled: false
},
navigator: {
enabled: false
},
credits: {
enabled: false
},
plotOptions: {
spline: {
compare: 'percent',
marker: {
enabled: true
}
},
},
series: series
};
解决方案
您的意思是在您使用节点导出服务器 ( https://github.com/highcharts/node-export-server )时,在导出的图像上看不到系列标签?如果是这样,其背后的原因是因为系列标签脚本(https://code.highcharts.com/modules/series-label.js )不包含在构建中的其他附加脚本(例如 xrange)中。 .js文件。您需要做的就是添加以下内容:
'{{version}}/modules/series-label.js': 1
在cdnScriptsOptional数组中运行node build.js。有关更多信息,您可以访问导出服务器的 repo ( https://github.com/highcharts/node-export-server )。
推荐阅读
- vba - WHERE 子句上的“之前的最大日期”(OleDB SELECT 方法)
- reactjs - 在 Reactjs 中使用路由器时无法返回上一页
- c# - 有什么方法可以使用一种 c# 方法拆分两个不同的字符串?
- google-apps-script - 如何在没有用户干预的情况下输入 Google Sheets App Script?
- tensorflow - 如何使用 tf.range 创建 complex128 张量
- python - 将 matlab.object 转换为 pandas 数据框
- groovy - Groovy:带引号的 LinkedHashMap 值
- swift - Swift - 可选的泛型类型
- ios - Azure Pipelines iOS 预配配置文件已安装但找不到
- python - 如何在电脑启动时运行 python 脚本,但每天只运行一次?