Speak Multiseries Chart Data

Director, Sitecore Practice
  • Twitter
  • LinkedIn

Speak Multiseries Chart Data

I had trouble finding information on how to construct the SPEAK multiseries chart data in Sitecore, so I thought to document it here.

For multiseries chart, the expected data is formed as follows:

 {
 	"data": {
 		"dataset": [{
 			"data": [{
 				"Series": "SeriesValue1",
 				"Category": "CategoryValue1",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue2",
 				"Category": "CategoryValue1",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue3",
 				"Category": "CategoryValue1",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue1",
 				"Category": "CategoryValue2",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue2",
 				"Category": "CategoryValue2",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue3",
 				"Category": "CategoryValue2",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue1",
 				"Category": "CategoryValue3",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue2",
 				"Category": "CategoryValue3",
 				"Value": "Value"
 			}, {
 				"Series": "SeriesValue3",
 				"Category": "CategoryValue3",
 				"Value": "Value"
 			}]
 		}]
 	}
 }

Note: if you have 0 value, you cannot omit the series/category, but rather must explicitly set the value to 0 e.g.

{
"Series": "Visits",
"Date": "8/23/2016",
"Value": 0
}

Lead Architect, Sitecore Experience

Meng Hak

Meng is a Lead Architect at XCentium with over 10 years of experience in developing enterprise level software.

He has experience with various clients in entertainment, health, education and financial industries.

Related Blogs

Latest Blogs