Skip to content
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

请问旭日图是否支持 tooltip 属性 #7691

Closed
HazySoda opened this issue Feb 1, 2018 · 2 comments
Closed

请问旭日图是否支持 tooltip 属性 #7691

HazySoda opened this issue Feb 1, 2018 · 2 comments
Labels

Comments

@HazySoda
Copy link

HazySoda commented Feb 1, 2018

One-line summary [问题简述]

在旭日图的 option 中设置了 tooltip 属性后,在鼠标悬浮时抛出以下错误:

Uncaught TypeError: Cannot read property 'getData' of undefined
    at ExtendedClass._showSeriesItemTooltip (TooltipView.js?ae52:380)
    at ExtendedClass._tryShow (TooltipView.js?ae52:280)
    at ExtendedClass.eval (TooltipView.js?ae52:102)
    at Object.eval (util.js?10f4:424)
    at doEnter (globalListener.js?00cf:74)
    at eval (util.js?10f4:437)
    at eval (globalListener.js?00cf:45)
    at each (util.js?10f4:306)
    at Handler.eval (globalListener.js?00cf:44)
    at Handler.trigger (Eventful.js?223b:158)

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.1
  • Browser version [浏览器类型和版本]: Chrome 64.0
  • OS Version [操作系统类型和版本]: MacOS 10.13.1

Expected behaviour [期望结果]

正常显示 tooltip

ECharts option [ECharts配置项]

option = {
{
    "title": {
        "text": "总在库情况",
        "x": "center"
    },
    "tooltip": {
        "trigger": "item"
    },
    "series": {
        "type": "sunburst",
        "data": [
            {
                "name": "3期",
                "value": 100,
                "children": [
                    {
                        "name": "点融",
                        "value": 40,
                        "children": [
                            {
                                "name": "纳米贷",
                                "value": 20
                            },
                            {
                                "name": "纳米贷",
                                "value": 20
                            }
                        ]
                    },
                    {
                        "name": "华融",
                        "value": 60,
                        "children": [
                            {
                                "name": "纳米贷",
                                "value": 20
                            },
                            {
                                "name": "纳米贷",
                                "value": 40
                            }
                        ]
                    }
                ]
            },
            {
                "name": "6期",
                "value": 100,
                "children": [
                    {
                        "name": "华融",
                        "value": 30,
                        "children": [
                            {
                                "name": "精英贷",
                                "value": 10
                            },
                            {
                                "name": "精英贷",
                                "value": 20
                            }
                        ]
                    },
                    {
                        "name": "华融",
                        "value": 70,
                        "children": [
                            {
                                "name": "精英贷",
                                "value": 50
                            },
                            {
                                "name": "精英贷",
                                "value": 20
                            }
                        ]
                    }
                ]
            },
            {
                "name": "9期",
                "value": 60,
                "children": [
                    {
                        "name": "笑脸",
                        "value": 25,
                        "children": [
                            {
                                "name": "C端闪贷",
                                "value": 10
                            },
                            {
                                "name": "C端闪贷",
                                "value": 15
                            }
                        ]
                    },
                    {
                        "name": "笑脸",
                        "value": 35,
                        "children": [
                            {
                                "name": "C端闪贷",
                                "value": 25
                            },
                            {
                                "name": "C端闪贷",
                                "value": 10
                            }
                        ]
                    }
                ]
            },
            {
                "name": "12期",
                "value": 80,
                "children": [
                    {
                        "name": "金融",
                        "value": 30,
                        "children": [
                            {
                                "name": "现金贷",
                                "value": 8
                            },
                            {
                                "name": "现金贷",
                                "value": 22
                            }
                        ]
                    },
                    {
                        "name": "金融",
                        "value": 50,
                        "children": [
                            {
                                "name": "现金贷",
                                "value": 22
                            },
                            {
                                "name": "现金贷",
                                "value": 28
                            }
                        ]
                    }
                ]
            }
        ],
        "radius": [
            "10%",
            "70%"
        ],
        "label": {
            "verticalAlign": "middle",
            "fontSize": 12,
            "rich": {
                "verticalAlign": "top",
                "distance": 0,
                "position": "top"
            }
        },
        "levels": [
            {},
            {},
            {},
            {
                "label": {
                    "position": "outside",
                    "distance": 10,
                    "color": "#333",
                    "align": "center"
                }
            }
        ]
    },
    "color": [
        "#4390e2",
        "#ff6a3c",
        "#999999",
        "#ffbb3f",
        "#c23531",
        "#2f4554",
        "#61a0a8",
        "#d48265",
        "#91c7ae",
        "#749f83",
        "#ca8622",
        "#bda29a",
        "#6e7074",
        "#546570",
        "#c4ccd3"
    ]
}
}

Other comments [其他信息]

@pissang pissang added the bug label Feb 5, 2018
@Ovilia Ovilia mentioned this issue Feb 7, 2018
@Ovilia Ovilia closed this as completed in 4a940e9 Feb 7, 2018
@Ovilia
Copy link
Contributor

Ovilia commented Feb 7, 2018

@KidneyFlower 已支持,下个版本上线

@HazySoda
Copy link
Author

HazySoda commented Feb 7, 2018

@Ovilia 辛苦啦,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants