question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Highcharts 5 styled mode

See original GitHub issue

Highcharts 5, now supported by angular2-highcharts, has a “styled mode” where you use CSS instead of JS to style your charts. We would like to use this in a project, but it isn’t currently exposed by this library. Are there any plans to add this functionality?

If something like:

imports: [
  ChartModule.styledMode(),
  ...
]

was available that would be great.

Having quickly looked into it, it seems that modifying the HighchartsWrapper to require('highcharts/js/highcharts') would be sufficient to enable this behaviour by default. However, as the HighchartsService is provided directly to ChartComponent, it is difficult to inject an alternative from outside.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alphadevercommented, Jun 21, 2018

is there any updates on this thread ? my project is an angular/cli based project, and the approach @textbook suggested does not work for me

1reaction
textbookcommented, Dec 14, 2016

A bit more fiddling, and we found that you could alter src/tsconfig.json, adding:

"baseUrl": ".",
"paths": {
  ...,
  "highcharts": ["../node_modules/highcharts/js/highcharts.js"] 
}

and angular-cli.json, adding:

"styles": [
  ...,
  "../node_modules/highcharts/css/highcharts.css"
],

If anyone else has the same problem (trying to use styled mode with Angular-CLI), that seems to solve it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Style by CSS | Highcharts
Highcharts optionally features styled mode, where the graphic design is clearly separated from the chart functionality. When the chart.
Read more >
Custom themes in styled mode | Highcharts
Highcharts allows you to create your own custom charts' theme using native CSS rules or SASS (Syntactically Awesome Style Sheets). The default ...
Read more >
chart.styledMode | highcharts API Reference
In styled mode, this sets how many colors the class names should rotate between. With ten colors, series (or points) are given class...
Read more >
Styled mode column | Highcharts.com
Styled mode column ... Bar chart with 2 data series. ... Charts can be styled using CSS, allowing designers and developers to more...
Read more >
Design and style - Highcharts
Design and style. ... In this mode, the chart is adjusted to make room for title and legend, ... The text can also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found