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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:59:12+00:00 2026-06-05T18:59:12+00:00

I believe what I am trying to accomplish should be a fairly common task,

  • 0

I believe what I am trying to accomplish should be a fairly common task, yet I’m having difficulty getting it to work. I simply wish to create a multi-series plot from a data set containing (for each record) an ISO8601 timestamp along with multiple data points. The data is in JSON format and I’m using dojox.charting.chart “Lines” type.

I’m already aware that the Dojo charts cannot directly handle time-based axis data, let alone ISO8601. So I’ve already dealt with converting the x-axis to milliseconds-since-T0 server-side.

Here is a distilled example excerpt of my JSON:

[{"Offset_ms":0,"CP":250.58368,"TP":181.88211},
{"Offset_ms":360000,"CP":233.18443,"TP":119.94824},
{"Offset_ms":540000,"CP":227.15465,"TP":117.99422},
{"Offset_ms":720000,"CP":222.87495,"TP":117.55895},
{"Offset_ms":896000,"CP":218.19876,"TP":117.64221},
{"Offset_ms":900000,"CP":219.77487,"TP":117.93475}]

And the distilled JavaScript (assume the above JSON is in the variable ‘sequenceData’):

var chart = new dojox.charting.Chart("sequenceDataGraph");

chart.addPlot("default", {
    type: "Lines",
    tension: "X"
});
chart.addAxis("x", { labelFunc: labelTimeAxis });
chart.addAxis("y", { vertical: true });

var sequenceDataStore = new dojo.store.Observable(new dojo.store.Memory({
    data: {
        label: "Sequence",
        items: sequenceData
    }
}));

addSequenceDataSeries(chart, sequenceDataStore, "TP");
addSequenceDataSeries(chart, sequenceDataStore, "CP");

chart.render();

function addSequenceDataSeries(chart, sequenceDataStore, sColumnName) {
    chart.addSeries(sColumnName, new dojox.charting.StoreSeries(sequenceDataStore, { query: {} },
                    sColumnName));
}

What appears to be happening, is that Dojo Chart is not using the x-axis data at all, but instead plotting each point at a fixed interval based on the number of data points. That is, each data point seems to be assigned an ordinal, such as if Offset_ms was merely 1, 2, 3… Since my data points are not always at fixed intervals, the resulting graph is distorted.

How do I instruct Dojo Chart to use the “Offset_ms” field in the JSON data for the x-axis component?

I’ve scoured the tutorials, the API docs and performed numerous Google & SO searches to no avail. I’ve even browsed portions of the Dojo source, particularly StoreSeries.js.uncompressed.js, but I’m not finding any answers. Surely this is possible, and hopefully trivial!

  • 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-05T18:59:13+00:00Added an answer on June 5, 2026 at 6:59 pm

    Unfortunately, the official dojo documentation is seriously lacking, and I only figured out how to do something similar by browsing the dojo source. Specifically, line 135 of the StoreSeries test, http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/charting/tests/test_StoreSeries.html

    The StoreSeries constructor’s third argument accepts an object that maps the X and Y axis to specific fields in your data store.

    Change the following line in your code from this:

    chart.addSeries(sColumnName, new dojox.charting.StoreSeries(sequenceDataStore, { query: {} },
                    sColumnName));
    

    to this:

    chart.addSeries(sColumnName, new dojox.charting.StoreSeries(sequenceDataStore, { query: {} }, 
                    { x: "Offset_ms", y: sColumnName }));
    

    sColumnName becomes { x: "Offset_ms", y: sColumnName }

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

Sidebar

Related Questions

I believe task I am trying to accomplish is fairly easy, but I have
I'm trying to set up what I believe to be a rather common Django
I believe what I'm trying to do is simple enough, so I'm probably just
I am trying to do what I believe is called a join query. First,
I was trying to do something like Google's Adsense. I believe they use javascript?
I'm trying to use xmllint to validate the schema, which I believe uses the
I am trying to be able to import png, which I believe is from
I am trying to recreate this table in my rails 3 app. I believe
I've recently been trying to port a C++ application. I believe I have all
So I just trying to build a library using the NDK. I believe that

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.