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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:44:34+00:00 2026-05-13T10:44:34+00:00

I am using the dojox.charting.widget.Chart2D and I am trying to retrieve the data from

  • 0

I am using the dojox.charting.widget.Chart2D and I am trying to retrieve the data from an dojo.data.ItemFileReadStore. I can retrieve the data, and everything works and displays, except I cannot seem to find a way to display custom labels on the items. My HTML snippet is:

<div dojoType="dojo.data.ItemFileReadStore" jsId="chartDataStore" 
    url="json/archiveinfo.json.php"></div>
<div dojoType="dojox.charting.widget.Chart2D" id="chartTest" 
    theme="dojox.charting.themes.PlotKit.blue" style="width: 300px; height: 300px;">
  <div class="plot" name="default" type="Pie" fontColor="black" htmlLabels="false" 
    radius="100"></div>
  <div class="series" name="Series A" store="chartDataStore" field="y" 
    label="text" valueFn="Number(x)"></div>
  <div class="action" type="Tooltip"></div>
  <div class="action" type="MoveSlice"></div>
</div>

And my JSON from the ItemFileReadStore is:

{"identifier":"id","labelAttribute":"text","items":
  [
    {"id":1,"y":55,"text":"Free"},
    {"id":2,"y":45,"text":"Used"}
  ]
}

I have tried setting the label attribute in the series and have set the labelAttribute in the JSON. I also tried just label in the JSON and it didn’t work either. When I provide the data as a JSON in an array or provide the data directly in the series, I get the labels to work. I really wanted to make it more flexible though by providing the data via a DataStore.

  • 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-05-13T10:44:35+00:00Added an answer on May 13, 2026 at 10:44 am

    The way to do it is to modify your JSON a little and update corresponding attributes in the HTML.

    JSON:

    {
      "items": [
        {"id":1, "slice": {"y":55,"text":"Free"}},
        {"id":2, "slice": {"y":45,"text":"Used"}}
      ]
    }
    

    The only meaningful change is to separate pie-specific data in a sub-object (slice) for simplicity.

    HTML (only the store-related line should be modified):

    <div class="series" name="Series A"
      store="chartDataStore" field="slice"></div>
    

    Let me know how it goes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 265k
  • Answers 265k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I've tested several devices and emulators (although not very thoroughly),… May 13, 2026 at 12:28 pm
  • Editorial Team
    Editorial Team added an answer At the very bottom of their site they have a… May 13, 2026 at 12:28 pm
  • Editorial Team
    Editorial Team added an answer First, you need your id values to be different. You… May 13, 2026 at 12:28 pm

Related Questions

I am struggling with a simple dojo datagrid in my Zend Framework project. I
I have been trying to use an ajax-style file upload component (like the dojox
I am building a web application using Grails. I decided to use dojo and
this was my first dojo build so please excuse my ignorance in this matter.
I am trying to create a website where I host my data on google

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.