GithubHelp home page GithubHelp logo

Comments (6)

stitot avatar stitot commented on September 25, 2024 1

Oh, I see. Hm, not overly satisfied with how that works and/or is documented. Let's think about it.

from highcharts.

karolkolodziej avatar karolkolodziej commented on September 25, 2024

@stitot It also works with dashboards, but you must remember that all charts in Dashboards use the styledMode by default.
JS:

zones: [{
    value: 0, // Values less than 0
    color: '#ff0000',
    className: 'zone-below-zero'
}],

CSS:

.highcharts-graph.zone-below-zero {
  stroke: #ff0000;
}

If you declare the class for the zone it works- demo.

from highcharts.

stitot avatar stitot commented on September 25, 2024

Hm, I would expect it to work when I set styledMode to false (see https://jsfiddle.net/0hL1cps9/)

from highcharts.

karolkolodziej avatar karolkolodziej commented on September 25, 2024

And it does, you only need to remove the highcharts.css import. Otherwise, it is going to overwrite the styling- demo.

from highcharts.

TorsteinHonsi avatar TorsteinHonsi commented on September 25, 2024

Thank @karolkolodziej, this explains why we didn't get it to work.

Oh, I see. Hm, not overly satisfied with how that works and/or is documented. Let's think about it.

Under any circumstance, it means it's not a problem with Dash. If anything, we should improve the docs for Highcharts itself. But I don't think this is a special case. The general case is that if you use styledMode: false combined with the highcharts.css file, you might not get the styling you expect because the CSS overwrites your config. We could add that sentence under the styledMode doclet. But it's unlikely that users will look for the problem there 🤷 .

from highcharts.

stitot avatar stitot commented on September 25, 2024

As a developer I would expect that a rather explicit config (styledMode: false) would take precedence over any included CSS that affects style. Could in theory be handled by removing the CSS reference from the DOM, or by not adding classnames to output (if that what's happen), but I guess this have further implications that eludes me.

from highcharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.