apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.66k stars 19.61k forks source link

datazoom doesn's work #18380

Open TaucherLoong opened 1 year ago

TaucherLoong commented 1 year ago

Version

echarts 5.2.2

Link to Minimal Reproduction

No response

Steps to Reproduce

<!DOCTYPE html>

Awesome-pyecharts

when adding datazoom section, the graph page shows nothing, but removing it, a broken line chart can normally shows up

Current Behavior

Uncaught TypeError: n[1].toFixed is not a function _setAxisModel http://192.168.50.142:8000/static/javascript/echarts.min.js:45 reset http://192.168.50.142:8000/static/javascript/echarts.min.js:45 overallReset http://192.168.50.142:8000/static/javascript/echarts.min.js:45 eachTargetAxis http://192.168.50.142:8000/static/javascript/echarts.min.js:45 E http://192.168.50.142:8000/static/javascript/echarts.min.js:35 eachTargetAxis http://192.168.50.142:8000/static/javascript/echarts.min.js:45 each http://192.168.50.142:8000/static/javascript/echarts.min.js:35 each http://192.168.50.142:8000/static/javascript/echarts.min.js:35 eachTargetAxis http://192.168.50.142:8000/static/javascript/echarts.min.js:45 overallReset http://192.168.50.142:8000/static/javascript/echarts.min.js:45 eachComponent http://192.168.50.142:8000/static/javascript/echarts.min.js:45 overallReset http://192.168.50.142:8000/static/javascript/echarts.min.js:45 qg http://192.168.50.142:8000/static/javascript/echarts.min.js:45 _doReset http://192.168.50.142:8000/static/javascript/echarts.min.js:45 perform http://192.168.50.142:8000/static/javascript/echarts.min.js:45 _performStageTasks http://192.168.50.142:8000/static/javascript/echarts.min.js:45 E http://192.168.50.142:8000/static/javascript/echarts.min.js:35 _performStageTasks http://192.168.50.142:8000/static/javascript/echarts.min.js:45 performDataProcessorTasks http://192.168.50.142:8000/static/javascript/echarts.min.js:45 update http://192.168.50.142:8000/static/javascript/echarts.min.js:45 setOption http://192.168.50.142:8000/static/javascript/echarts.min.js:45 success http://192.168.50.142:8000/index/:255 jQuery 4

Expected Behavior

datazoom can control the chart, zoom-in and zoom-out can be used for xaxis.

Environment

- OS:linux 18.4
- Browser:firefox
- Framework:python and echart

Any additional comments?

def line_test() -> Line:

t_list=[]

t_list,p_list=quote_p.get_times_points()
# global num
# n_list.append(num)
# num=num+1
# t_list.append(t)
top=max(p_list)
botm=min(p_list)
topceil=math.ceil(top*10)/10
botmfloor=math.floor(botm*10)/10
# jscode=JsCode(formatterCode)
# line = (
        # Line()
        # .add_xaxis(
        # t_list,
        # )
        # .add_yaxis(
        # series_name="实时行情",
        # y_axis=p_list,
        # is_smooth=False,
        # label_opts=opts.LabelOpts(is_show=False),
        #  )
        # .set_global_opts(
        # title_opts=opts.TitleOpts(title="瑞德智能"),
        # xaxis_opts=opts.AxisOpts(type_="value",min_=str(0*60*60),max_=str(4*60*60+1800)
                                # axislabel_opts=opts.LabelOpts(formatter=  '{value}s' )
        # ),
    #    datazoom_opts=opts.DataZoomOpts(type_='slider'),
        # yaxis_opts=opts.AxisOpts(type_="value",min_=str(botmfloor),max_=str(topceil))
    #    
    # )
        # .dump_options_with_quotes()
# )
# print(line)

print("ceil value:",topceil)
print("bottom value:",botmfloor)
return  {"timeArray":t_list,"pointArray":p_list,"ceil":topceil,"bottom":botmfloor}
helgasoft commented 1 year ago

not-a-bug The code and post belong to pyecharts.

cMing1997 commented 1 year ago

not-a-bug 代码和帖子属于pyecharts

我在使用JavaScript的时候确实也出现了这个问题 Firefox浏览器 80的版本的时候,底部滑块滑动不了