GithubHelp home page GithubHelp logo

Support colors about react-jsx-highcharts HOT 4 CLOSED

whawker avatar whawker commented on May 22, 2024
Support colors

from react-jsx-highcharts.

Comments (4)

whawker avatar whawker commented on May 22, 2024

Glad you like it! 😀

Hmm I'm surprised that doesn't work, when you say passed "as a prop" do you mean...

<HighchartsChart colors={['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce', 
   '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a']}>
 // etc
</HighchartsChart>

colors wouldn't be passed as part of plotOptions as that is not how you pass it via Highcharts config.

from react-jsx-highcharts.

will-stone avatar will-stone commented on May 22, 2024

Ahh, gotcha. I was misunderstanding how the config translated into props. I still find it a little confusing. It appears some top level config have their own components and some are expected to go on the HighchartsChart as props. Maybe all top-level config chould be components, and those that don't have child keys (like colors) use children? e.g.

<HighchartsChart>
...
<colors>
  {['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce', 
   '#492970', '#f28f43', '#77a1e5', '#c42525', '#a6c96a']}
</colors>
...
</HighchartsChart>

from react-jsx-highcharts.

Crizzooo avatar Crizzooo commented on May 22, 2024

I'm unable to get any color styling, whether it is a property on HighchartsChart plotOptions={{ colors }}, or directly placed as aprop on HighchartsChart or Chart. Is this supported? Do you have an example?

from react-jsx-highcharts.

whawker avatar whawker commented on May 22, 2024

I would personally recommend using the CSS styled version of Highcharts. Then you can use any colours you like.

Example here

from react-jsx-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.