+ Reply to Thread
Results 1 to 3 of 3

Number-based Gradient Fill for Excel bar chart

  1. #1
    Registered User
    Join Date
    06-16-2022
    Location
    New Jersey
    MS-Off Ver
    Office 365
    Posts
    5

    Number-based Gradient Fill for Excel bar chart

    Thanks in advance for any assistance.

    I've learned the basics of the gradient fill option within an excel chart and was able to get it to work in the following way for a bar chart:
    Values in series range from 0% to 100%(for this example, 25%, 50%, 75%, and 100%), and y axis scale also goes from 0% to 100%.
    I currently am using gradient fill across the bars so each bar changes color from green to red as you move up the bar.
    So the 25% bar which starts at the x-axis (0%) and moves up to 25%, shows a smooth transition from green to red as you move up the bar, so 0% is green and 25% is red.
    Similarly, the 50% bar which starts at the x-axis (0%) and moves up to 50%, shows a smooth transition from green to red as you move up the bar, so 0% is green and 50% is red.
    Similarly, the 100% bar which starts at the x-axis (0%) and moves up to 100%, shows a smooth transition from green to red as you move up the bar, so 0% is green and 100% is red.

    What I would like to do next is to have the coloration gradient be decided by the actual value instead of how far up the bar it is. 0% of value would be green and 100% of value would be red and 50% would be halfway between green and red(let's say orange). I want to see the following results after this change:
    In my first example, the 25% bar which starts at the x-axis (0%) and moves up to 25% would transition from green to a lighter green, maybe approaching orange, but would never reach red, because it's value never reached 100%
    In my second example, the 50% bar which starts at the x-axis (0%) and moves up to 50% would transition from green to orange, but would never reach red, because it's value never reached 100%
    In my third example, the 100% bar which starts at the x-axis (0%) and moves up to 100% would transition from green to red. (this is the only one that would match the gradient colors of the original chart.

    I found a software called grapher which appears to do this but I need to accomplish within excel if possible. Any help would be appreciated.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,428

    Re: Number-based Gradient Fill for Excel bar chart

    The example chart is created using a combination of chart types and additional data, driven by formula.

    use a series of 100% bars to provide the graduation colour

    2 series, as stacked bar, to both reveal and mask the colour fill.
    The actual data bar has no fill.
    The pad data bar has fill to match plot area colour.

    The secondary axis are still visible so you can see how chart is constructed. This can be hidden by formatting no axis labels.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    06-16-2022
    Location
    New Jersey
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Number-based Gradient Fill for Excel bar chart

    Thanks so much. Solution is perfect. I knew there was a way.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Gradient Fill for Rows
    By jp16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-21-2018, 02:24 AM
  2. Using Gradient Fill in Excel 2016?
    By Brian.Aerojet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2018, 02:01 AM
  3. Chart marker radial gradient fill with VBA
    By ZZR in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-18-2018, 12:52 PM
  4. Colour gradient of line graph based on row number
    By dannybeckett in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-04-2018, 09:35 AM
  5. Gradient Fill Problem - Doughnut Chart
    By dgibney in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-24-2014, 07:07 AM
  6. Replies: 1
    Last Post: 07-22-2014, 03:01 AM
  7. Gradient fill a point with 2 general colors (excel 2010)
    By spacely in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-16-2012, 05:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1