Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
HighStocks series does not show line on Black Colors
            let code = Math.floor(Math.random() * 16777215).toString(16);
            if (code === "000000" || code === "ac132") {
                code = Math.floor(Math.random() * 16777215).toString(16);
            }
            let colored = '#' + code;

            let dataset = {
                label: value.name,
                name: value.urls.name,
                color: colored,
                stickyTracking: true,
                showInNavigator: true,
                visible: true,
                data: value.values,
                dataGrouping: {
                    enabled: false,
                }

            };

enter image description here

And also the legend gets weird with black, covers the whole space and does not show other series properly, it only happens with black colors and its combinations.

I am using Highstock JS v9.2.2 (2021-08-24)

Here is the fiddle with one sample color code Fiddle link

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As mentioned by @ppotaczek the color code is invalid hex format.

New javascript code to create random colors

let code = "#000000".replace(/0/g,function(){return (~~(Math.random()*16)).toString(16);});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!