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

this.options.dataLabels.style.textOverflow is not checking this.options.dataLables.style != undefined #8666

Closed
dangsd opened this Issue Jul 23, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@dangsd

dangsd commented Jul 23, 2018

Expected behaviour

chart displays correctly

Actual behaviour

crashes the site with

TypeError: Cannot read property 'textOverflow' of undefined
    at e.<anonymous> (highstock.js:368)
    at Array.forEach (<anonymous>)
    at a.each (highstock.js:28)
    at e.A.pie.A.pie.placeDataLabels (highstock.js:368)
    at e.A.pie.A.pie.drawDataLabels (highstock.js:366)
    at e.render (highstock.js:303)
    at e.<anonymous> (highstock.js:522)
    at e.a.(:8080/anonymous function) [as render] (http://localhost:8080/build/app.bundle.js:1174:80)
    at highstock.js:255
    at Array.forEach (<anonymous>)

Live demo with steps to reproduce

It is hard to reproduce

Product version

highcharts 6.1.1
@types/highcharts 5.0.25

Affected browser(s)

chrome 67.0.3396.99

@sebastianbochan

This comment has been minimized.

Show comment
Hide comment
@sebastianbochan

sebastianbochan Jul 24, 2018

Contributor

Hi @dangsd,
Could you send us a chart's config and data?

Contributor

sebastianbochan commented Jul 24, 2018

Hi @dangsd,
Could you send us a chart's config and data?

@brimimc

This comment has been minimized.

Show comment
Hide comment
@brimimc

brimimc Aug 3, 2018

Here is an example where it fails https://jsfiddle.net/avL0hum7/1/

brimimc commented Aug 3, 2018

Here is an example where it fails https://jsfiddle.net/avL0hum7/1/

@brimimc

This comment has been minimized.

Show comment
Hide comment
@brimimc

brimimc Aug 3, 2018

@dangsd I found a work-around in the meantime - in my case I'm in a Pie Chart, so set

            plotOptions: {
                pie: {
                    dataLabels: {
                        style: {
                            textOverflow: 'ellipsis',
                        }
                    }
                }
            }

brimimc commented Aug 3, 2018

@dangsd I found a work-around in the meantime - in my case I'm in a Pie Chart, so set

            plotOptions: {
                pie: {
                    dataLabels: {
                        style: {
                            textOverflow: 'ellipsis',
                        }
                    }
                }
            }

@sebastianbochan

This comment has been minimized.

Show comment
Hide comment
@sebastianbochan

sebastianbochan Aug 3, 2018

Contributor

Hi @brimimc,
Thank you for demo.

Internal note
The problem appears only in the styled mode since 6.1.0 version (6.0.7 works properly - https://jsfiddle.net/BlackLabel/57rxh892/).

Non styled: https://jsfiddle.net/BlackLabel/zgq8316s/ works properly.

Contributor

sebastianbochan commented Aug 3, 2018

Hi @brimimc,
Thank you for demo.

Internal note
The problem appears only in the styled mode since 6.1.0 version (6.0.7 works properly - https://jsfiddle.net/BlackLabel/57rxh892/).

Non styled: https://jsfiddle.net/BlackLabel/zgq8316s/ works properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment