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 8977895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:28:44+00:00 2026-06-15T19:28:44+00:00

This is likely fairly simple Q (learning the ropes with Dojo). I have successfully

  • 0

This is likely fairly simple Q (learning the ropes with Dojo).

I have successfully created a bar chart in my web app.

// Create Chart
var chartDiv = dojo.create("div");
dijit.byId("someDiv").setContent(chartDiv);
var chart1 = dojox.charting.Chart2D(chartDiv);

chart1.addPlot("default", {
    type: "Bars",
    gap: 3
});
chart1.addAxis("x");
chart1.addAxis("y", {
    vertical: true,
    labels: [{
        value: 1,
        text: "Field1"
    }, {
        value: 2,
        text: "Field2"
    }]
});
chart1.addSeries("MyData", [var1, var2]);
chart1.render();

I see that you can create custom themes to your charts. However, I am thinking there must be a simpler way to define a colour (ideally a subtle gradient) for each of my bars. I am also restricted to using a dojo version served up by Esri, and not sure if that allows me to then create cutom themes.

There will only ever be 5 bars (2 in the above snippet).

i.e. I want to define a different color for each bar.

Can someone put me out of my misery and provide some guidance on how to achieve this?

  • 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-15T19:28:45+00:00Added an answer on June 15, 2026 at 7:28 pm

    In hindsight, bit lazy on my side. Here is what worked for me:

    chart1.addSeries("Languages", [
        { y: var1, fill: "#BD48E9" },
        { y: var2, fill: "#FA4848" },
    ]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

,This question is likely subjective, but a lot of grid Javascript plugins have come
I know this is most-likely a simple question but when you restore a database
I am writing a fairly complex iPad app - my first bigger one. This
There is this simple function which I have used with C++ in the past
I am writing a fairly simple wrapper around Win32 controls/dialogs/windows. The issue I have
This likely applies to non MVC too. But, Is it possible to use the
This very likely a setup issue on my part. I am trying to run
This is likely by design for big teams with proper QA departments, but we
This is likely a stupid question but I always find myself wondering which is
I think this is likely to be a generic .NET assembly loading question, but

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.