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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:54:34+00:00 2026-06-01T05:54:34+00:00

I am using a dojo column chart. I want to add a custom line

  • 0

I am using a dojo column chart. I want to add a custom line (some kind of a threshold line) that is drawn on the plot.
So, lets say y axis ranges from 0 to 5. I want a horizontal line at, lets say, 4.2 running across the plot.
It is a column chart.
I was hoping to find some drawing APIs that can help me do custom drawing on the plot but i am unable to figure out how. I know the chart uses gfx and surface so if i can get a handle to the chart/plot surface perhaps i can draw a custom line? Will also need data to rendered co-ordinates mapping to make this happen

My current chart uses code like:

var mychart = new dojox.charting.Chart2D("columns").
        addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true,
                            font: "normal normal 10pt Arial", 
                             labels: [{value: 1, text: "Q2 FY11"},
                                      {value: 2, text: "Q3 FY11"},
                                    {value: 3, text: "Q4 FY11"},
                                    {value: 4, text: "Q1 FY12"}]
                            }).
        addAxis("y", {vertical: true, includeZero: false, fixLower: "major", fixUpper: "major", min: 0, max: 5, font: "normal normal 10pt Arial", majorTick: {color: "black", length: 6}, minorTicks: false}).
        addPlot("default", {type: "ClusteredColumns", tension: "S", shadows: {dx: 2, dy: 2}, gap: 5, minBarSize : 14, maxBarSize:24, animate:  { duration: 1000, easing: dojo.fx.easing.linear} }).
        addSeries("Series A", [{ y: 2.3, tooltip: "FFFF"}, { y: 3.5, tooltip: "GGGG"}]).
        addSeries("Series B", [1.2, 2.5]);
  • 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-01T05:54:35+00:00Added an answer on June 1, 2026 at 5:54 am

    You could render the line using another plot.

    new dojox.charting.Chart2D("columns").
        addAxis("x", {fixLower: "minor", fixUpper: "minor", natural: true,
                            font: "normal normal 10pt Arial", 
                             labels: [{value: 1, text: "Q2 FY11"},
                                      {value: 2, text: "Q3 FY11"},
                                    {value: 3, text: "Q4 FY11"},
                                    {value: 4, text: "Q1 FY12"}]
                            }).
        addAxis("y", {vertical: true, includeZero: false, fixLower: "major", fixUpper: "major", min: 0, max: 5, font: "normal normal 10pt Arial", majorTick: {color: "black", length: 6}, minorTicks: false}).
        addPlot("default", {type: "ClusteredColumns", tension: "S", shadows: {dx: 2, dy: 2}, gap: 5, minBarSize : 14, maxBarSize:24, animate:  { duration: 1000, easing: dojo.fx.easing.linear} }).
        addSeries("Series A", [{ y: 2.3, tooltip: "FFFF"}, { y: 3.5, tooltip: "GGGG"}]).
        addSeries("Series B", [1.2, 2.5]).
        addPlot("threshold", { type: "Lines" }).
        addSeries("threshold", [{x: 0, y: 4.2}, {x: 4, y: 4.2}], { plot: "threshold" }).
        render();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using dojo and I want to get a node that has a
I'm using dojo charting and for some reason the legend for my chart is
I am currently working on a project that is using Dojo as the js
Every Dojo chart that I have worked with has allowed for the use of
Using dojo.dnd, I want to allow a user to drag only one item at
I am using Dojo 1.2 to implement some functionality on my customer's webpage. One
I have started using Dojo's new on module to add my events. It works
i am using dojo toolkit with php codeigniter 2.1.0 and i want to put
I want to consume a Restful webservice using dojo . the result of the
I'm using Dojo 1.5 to create a dijit.form.Select with some data from a datastore.

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.