Why Doesn’t My Duration Chart Work?

Why Doesn’t My Duration Chart Work?

Use meta.duration, Not result.duration

If you’re trying to build a chart with duration as the metric and it’s not working, then the reason is probably that you’re trying to get values from result.duration. Use meta.duration instead.

Statements encode the result.duration property as a string in ISO 8601 format: e.g., PT59.14S = 59.14 seconds. In contrast, statements keep the value in the meta.duration property as an integer: e.g., 59140 = 59,140 milliseconds. Because meta.duration is a number, you can use it to calculate the heights of columns in a bar chart.

Duration Conversion Factors

If you want to show values in units other than milliseconds, then in Chart Builder, under Data Settings > Metric Scale, enter one of these conversion factors:
  1. 0.001      seconds
  2. 1.66667e-5 minutes
  3. 2.77778e-7 hours
  4. 1.15741e-8 days
In Metric Builder and List Builder, you do it by adding an inline mathematical operation in the title or subtitle: e.g., ${value.metric * 0.001}.

In VQL, you convert duration by adding a stage that performs the needed math: "$addFields": {"metric": {"$multiply": ["$metric", 2.77778e-7]}}.



    • Related Articles

    • How Do I Build a Sankey Chart?

      How to Build a Sankey Chart If you want to analyze navigation patterns in your course, then you can show branching — and even abandonment — with a Sankey chart. How to create — In an Advanced Graph Query widget, insert code like this… { "title": ...
    • How Do I Add Tooltips to a Timeseries Chart?

      Timeseries charts are usually so dense that tooltips are hard to select, so they don't have them. However, if you really need them, then you can add them yourself. When you're filling-in the Chart Builder for a custom Timeseries chart, scroll down to ...
    • Will LRS Reporting Work with a SCORM Package?

      No. Although an authoring tool may offer the option to enable “Report to an external LRS” for packages other than xAPI and cmi5, those other SCORM or AICC packages do not send xAPI statements to an LRS. The courseware player in each package matches ...
    • What is Veracity Launch and How Does it Work?

      Veracity Launch is a Software as a Service (SaaS) solution for e-learning content hosting and playback. You can use Launch instead of an LMS to offer learners a content portal for launching content. Launch lets learners enroll and complete courses, ...
    • What Types of Metrics and Dashboards Can I Create with Articulate Storyline and Rise xAPI Data?

      What features do Articulate Storyline and Rise offer that make good use cases for the Veracity Learning LRS dashboard to help analyze learning performance metrics? In this article, the star ratings show the degree to which Articulate offers xAPI to ...