Domain Result

Description: User Story
—-

As a user, I should be able to see a Domain Result module (Element) in a program.

_This story is to build out the module skeleton and should only include the defaults that ALL scale results include. Additional stories are linked below to cover the graphing functionality. _

**[Zeplin Link](https://zpl.io/2pYGLoV)**

**All Scale Domain include the following:**
– Domain Title _(EX: Life Score)_
– Future Share Button (https://www.pivotaltracker.com/story/show/150824000)
– Optional Domain image
– Domain Result Title _(EX: Well Balanced)_
– **_IF the Domain Score is configured to show_** show the Domain Result Score
– Optional Domain Result Description

Sample JSON Response
—-
“`JSON
{
“id”:1608999,
“type”:”DomainResultElement”,
“title”:null,
“subtitle”:null,
“content”:null,
“description”:null,
“is_resource”:false,
“position”:1,
“errors”:[],
“display_graph”:true,
“display_longitudinal_result”:true,
“caption”:null,
“attribution”:null,
“display_score”:true,
“longitudinal_option”:”all_scales”,
“assessment”:{
“id”:”969993622081504381″,
“user_id”:”8″,
“champion_id”:”52″,
“title”:”Sample Assessment 1 – Scales”,
“description”:”This assessment is built to test the scale results for an assessment with longitudinal scales.”,
“created_at”:”2017-08-31T16:04:10.560Z”,
“updated_at”:”2017-08-31T18:42:57.862Z”,
“legacy_assessment_id”:null,
“show_longitudinal_results”:true,
“id_str”:”969993622081504381″,
“user_id_str”:”8″,
“champion_id_str”:”52″,
“legacy_assessment_id_str”:””
},
“domain”:{
“id”:”970020933593990575″,
“assessment_id”:”969993622081504381″,
“identifier”:”Life Score”,
“name”:”Life Score”,
“description”:”A score helping you identify a rollup of the areas in your life.”,
“display_score_type”:”sum_score”,
“preferred_visualization”:”bar_chart”,
“table_sort”:”desc”,
“std_dev”:null,
“created_at”:”2017-08-31T16:58:26.343Z”,
“updated_at”:”2017-08-31T19:20:55.076Z”,
“scale_count_type”:”top_scales”,
“table_row_count”:2,
“show_bar_chart_labels”:true,
“assessment_id_str”:”969993622081504381″,
“id_str”:”970020933593990575″,
“scales”:[
{
“id”:”969994703121417348″,
“scale_type”:”ordinal”,
“parent_scale_id”:null,
“user_id”:”8″,
“name”:”Happiness”,
“description”:”A measure of how happy you are.”,
“created_at”:”2017-08-31T16:06:19.426Z”,
“updated_at”:”2017-08-31T18:00:15.103Z”,
“champion_id”:”52″,
“display_score_type”:”sum_score”,
“identifier”:”Happiness”,
“show_scale_results”:true
},
{
“id”:”970023921859429928″,
“scale_type”:”ordinal”,
“parent_scale_id”:null,
“user_id”:”8″,
“name”:”Time with loved ones”,
“description”:”How much time do you spend with loved ones?”,
“created_at”:”2017-08-31T17:04:22.574Z”,
“updated_at”:”2017-08-31T18:06:44.123Z”,
“champion_id”:”52″,
“display_score_type”:”sum_score”,
“identifier”:”Time with loved ones”,
“show_scale_results”:true
},
{
“id”:”970069808165946583″,
“scale_type”:”ordinal”,
“parent_scale_id”:null,
“user_id”:”8″,
“name”:”Diet”,
“description”:”How are your eating habits contributing to your happiness?”,
“created_at”:”2017-08-31T18:35:32.644Z”,
“updated_at”:”2017-08-31T18:37:21.118Z”,
“champion_id”:”52″,
“display_score_type”:”sum_score”,
“identifier”:”Diet”,
“show_scale_results”:true
}
]
},
“assessment_id”:”969993622081504381″,
“domain_id”:”970020933593990575″,
“image”:null
}
“`

—-

Other parts of this module for context
—-

– Optional Bar Graph – https://www.pivotaltracker.com/story/show/149935656
– Optional line graph with longitudinal data – https://www.pivotaltracker.com/story/show/150724687
– Optional Radar Chart – https://www.pivotaltracker.com/story/show/149935652
– Optional data table – https://www.pivotaltracker.com/story/show/150726154

—-

Web Code – for reference
—-
https://github.com/TangoGroup/polymer/blob/mainline/epoxy/app/components/content/eg-domain-result.html
https://github.com/TangoGroup/polymer/blob/mainline/epoxy/app/components/content/eg-domain-result.js

Complex charting and tabular display here. Also some additional data fetching for historical scores.
Owner: