[email protected]
Posts: 1
Joined: Wed Dec 05, 2018 4:45 pm

Syntax Error adding CSS

Wed Dec 05, 2018 4:52 pm

I'm trying to add styles to an item in labels but getting a syntax error no matter what I do. the tool tip says to do it this way:

style: {
left: '100px',
top: '100px'
}

but the syntax error says unexpected token at position 0.

Does anyone know the correct syntax for adding CSS to items in labels? Sorry it's such a basic question but I have a hard deadline for a client. Thanks in advance!

rafalS
Posts: 2660
Joined: Thu Jun 14, 2018 11:40 am

Re: Syntax Error adding CSS

Wed Dec 05, 2018 5:21 pm

Hi, aleent1!

What labels exactly are you talking about? What do you want to move and where? Can you send me your chart's config or screen?

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead

digitalbakers
Posts: 4
Joined: Fri Jun 14, 2019 9:06 am

Re: Syntax Error adding CSS

Mon Jun 17, 2019 6:58 am

Hello,

We are experiencing the same issue.

Screenshoot added:

https://monosnap.com/file/P6VrB2u9GmA6K ... hY0dcU1k1h

We are trying to add a label above the legend.

rafalS
Posts: 2660
Joined: Thu Jun 14, 2018 11:40 am

Re: Syntax Error adding CSS

Mon Jun 17, 2019 8:22 am

Hi digitalbakers,

Thanks for providing a screenshot and writing about your issue.

Old "Labels" are deprecated, you can find info about this here in Highcharts API: https://api.highcharts.com/highcharts/labels
We are removing it from the Cloud soon.

Instead, you can use new, more advanced annotations:
Annotations.PNG
Annotations.PNG (88.21 KiB) Viewed 3943 times


Let me know if you have any further questions.

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Cloud”