-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
图片保存时出现错误 #659
Comments
什么版本?更新试试? |
同样发现保存图片时失败或报错,官网例子页面的混搭多图联动可以重现; |
谢谢反馈 |
fixed |
问题似乎还是存在呢?点击保存图片的时候产生的,不过点击之后图片却能显示出来,也可以单击保存,但是控制台会偶尔报错(有时又不会)。 同样使用的是angularjs动态生成的图表。(echarts-2.0.3) pv = {} # save all pv data
pv_chart = DigEchartsResizeService.makeResizableChart('#chart-pv')
# 经测试这里用pv_chart = ec.init($('#chart-pv')[0])也是一样的错误
default_option =
title:
x: 'left'
y: 'top'
tooltip:
trigger: 'axis'
legend:
data: []
toolbox:
show: true,
orient: 'vertical'
y: 'center'
feature:
mark:
show: false
dataView:
show: true
readOnly: false
magicType:
show: true
type: ['line', 'bar', 'stack', 'tiled']
dataZoom:
show: true
restore:
show: true
saveAsImage:
show: true
calculable: true
xAxis: [
{
type: 'category'
data: ("#{i}点" for i in _.range(0, 24))
}
]
yAxis: [
{
type: 'value'
splitArea:
show: true
}
]
series: []
renderChart = (pv, chart, title) ->
option = angular.copy(default_option)
option.title.text = title
for k in _.sortBy(_.keys(pv))
v = pv[k]
option.legend.data.push(k)
option.series.push(
name: legend
data: v.data
type: 'line'
)
chart.setOption(option, true) # not_merge is true
$scope.query = (data) ->
data.action = 'query'
$http
.post($location.path(), data)
.success((res) ->
if res.status == 'success'
for k, v of res.data
if _.str.endsWith(k, ':pv')
pv[k] = v
else
uv[k] = v
renderChart(pv, pv_chart, 'PV')
# renderChart(uv, uv_chart, 'UV')
) Traceback: |
当我点击保存图片是出现以下错误:
错我信息:
Uncaught TypeError: Cannot read property 'mod' of null,
c.refreshShapes
updatePainter
(anonymous function)
错误信息位置:
echarts-plain.js:35
我的html代码:
我的js代码(用的是angularjs):
还有,当我用require(zrender/shape/Text)时,总是报unexpected:"_",以上是我使用过程中遇到的问题,谢谢解答。
The text was updated successfully, but these errors were encountered: