Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 176
Registered: ‎03-04-2016

How to properly configure Time charts

[ Edited ]

Hey guys,

 

Is there a tuto or a documentation somewhere about the time charts?

I can't make it work and i would like to know how should the geojson be structured and how to properly set it up in the Studio.

 

Thanks in advance,

 

Elodie

Highlighted
Technical Evangelist
Posts: 1,225
Registered: ‎09-11-2015

Re: How to properly configure Time charts

[ Edited ]

Hi Elodie,

 

The documentation is currently under construction but should be online soon. There are few basic steps for time charts:

  1. Have a correct date attribute and provide correct formatting string for that one. The format is accepted in D3 form, documented here:
    https://github.com/mbostock/d3/wiki/Time-Formatting
    https://github.com/d3/d3-time-format/blob/master/README.md#locale_format

    So for instance for ISO date format like 2012-04-20T00:00:00 you would use %Y-%m-%dT%H:%M:%S
  2. Be sure that all attributes have this format. If you'd have just a single feature with, say, null value then it will break the application.
  3. This is then a sample definition for the time charts:
    • Dimension type = TIME
    • Provide date column, format and dimension name
    • Define a simple measure, e.g. SUM or AVERAGE of some number attribute
    • Define Time Chart with your time dimension and measure
    • Pick Selection type - either unique or range (this defines the UI Chart behavior)

Attached is a sample app screen that we were able to build during this week.

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Technical Evangelist
Posts: 1,225
Registered: ‎09-11-2015

Re: How to properly configure Time charts

I've set up this sample tester for seeing the format results:

https://jsfiddle.net/ee4ervrb/1/

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Regular Contributor
Posts: 176
Registered: ‎03-04-2016

Re: How to properly configure Time charts

Thanks very much Jan,

 

I've been busy but now i will try this and get back to you.

 

Elodie