Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8848165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:21:48+00:00 2026-06-14T12:21:48+00:00

I have been dealing with this script for a long time already i can’t

  • 0

I have been dealing with this script for a long time already i can’t figure how to give a di different background color to each bar in a two series data array, I am able to do like so:

            data: [{
                y: 88,
                color: {
                    linearGradient: {
                        x1: 0,
                        y1: 0,
                        x2: 1,
                        y2: 0
                    },
                    stops: [
                        [0, 'rgb(66, 121, 54)'],
                        [.50, 'rgb(86, 146, 71)'],
                        [.50, 'rgb(97, 159, 79)'],
                        [1, 'rgb(120, 182, 98)']]
                }

                }

but i need to have my data array like so:

    series: [{
            name: 'Previous',
            data : [145, 180, 199, 244]
        }, {
            name: 'Current',
            data : [145, 180, 199, 244]
        }]

and the give different colors using a color array like:

        colors: [ 

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'orange'], [1, '#fff']] },

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'gray'], [1, '#fff']] },

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'fushia'], [1, '#fff']] },

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'green'], [1, '#fff']] },

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'pink'], [1, '#fff']] },

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'purple'], [1, '#fff']] },

        ],

I created a http://jsfiddle.net/creativestudio/R4CmJ/

This is a snapshot of what I am trying to do, basically first column of each group has different color, second bar has same solid color.enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:21:49+00:00Added an answer on June 14, 2026 at 12:21 pm

    I was able to fix the problem using adding this to the plotOptions series ” colorByPoint: true” now the code looks like this:

                series: {
                    borderWidth: 0,
                    shadow: false,
                    borderRadius: 2,
                    pointWidth: 16,
                    shadow: false,
                    colorByPoint: true
    

    // groupPadding: 0.001
    }

    and then the colors array looks like this:
    colors: [

            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(62, 131, 161)'], [.50, 'rgb(45, 94, 119)'], [.50, 'rgb(51, 107, 134)'], [1, 'rgb(34, 72, 91)']] },
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(62, 131, 161)'], [.50, 'rgb(45, 94, 119)'], [.50, 'rgb(51, 107, 134)'], [1, 'rgb(34, 72, 91)']] },
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(62, 131, 161)'], [.50, 'rgb(45, 94, 119)'], [.50, 'rgb(51, 107, 134)'], [1, 'rgb(34, 72, 91)']] },
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(62, 131, 161)'], [.50, 'rgb(45, 94, 119)'], [.50, 'rgb(51, 107, 134)'], [1, 'rgb(34, 72, 91)']] },
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(66, 121, 54)'], [.50, 'rgb(86, 146, 71)'], [.50, 'rgb(97, 159, 79)'], [1, 'rgb(120, 182, 98)']]},
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(167, 195, 100)'], [.50, 'rgb(183, 206, 128)'], [.50, 'rgb(192, 213, 145)'], [1, 'rgb(207, 223, 170)']]},
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(211, 127, 39)'], [.50, 'rgb(220, 151, 52)'], [.50, 'rgb(224, 163, 57)'], [1, 'rgb(232, 186, 72)']]},
    
            { linearGradient: { x1: 0, y1: 0, x2: 1, y2: 0 },
                    stops: [ [0, 'rgb(190, 63, 36)'], [.50, 'rgb(203, 83, 48)'], [.50, 'rgb(208, 94, 53)'], [1, 'rgb(220, 116, 66)']]}
        ],
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been dealing with a problem for a while. How can I set
For a period of time, I have been dealing with an issue in pagination
Sorry if this is basic, but I have been dealing with figuring this out
I have been dealing with a problem for some time and would really appreciate
This is an issue I have been dealing with for months, and I would
I have been using DOM for a long time and as such DOM parsing
I've been dealing with this issue for a while, and still can't seem to
i've been dealing with this couple of hours and i still cant figure how
Recently I have been dealing with windows LogonUser API. The LogonUser api returns different
I have been dealing with this situation for a while now. I have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.