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

  • Home
  • SEARCH
  • 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

Related Questions

I'm trying to create a DOJO DataGrid populated using a dojo.data.ItemFileReadStore with very simple
I created a dojo chart using; var pieChart = new dojox.charting.Chart2D(pieChart); Afterwards I want
I can't figure out what's wrong. Using the latest everything from dojotoolkit.org. My chart
I'm using Dojo 1.5 to create a dijit.form.Select with some data from a datastore.
I am using DOJO for data grid presentation <div id=grid_log dojoType=dojox.grid.DataGrid store=log structure=window.layout_log queryOptions={deep:true}
i'm using Dojo 1.6 and trying to update an Html-Store with new data using
I am using dojox.grid.DataGrid and dojo.data.ItemFileWriteStore to render a grid. I want to implement
Strange error with an Project using dojo: if i call : http://localhost/project everything works
I am stuck with using Dojo to accomplish this. Basically what I am trying
I'm using the following html to load dojo from Google's hosting. <script src=http://www.google.com/jsapi></script> <script

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.