Published
Edited
Aug 7, 2020
Insert cell
Insert cell
element = html`<div ></div>`
Insert cell
Insert cell
Insert cell
Insert cell
options = {
return {
showTitles: true,
title: 'Custom title',
subtitle: 'Custom Subtitle',
footnote: 'Custom Footnote',
scrollStartPos: 0,
orientation: 'horizontal',
dataPoint: {
showLabels: true,
},
qHyperCubeDef: {
qDimensions: [{
qDef: {
qGrouping: 'N',
qFieldDefs: ['Case Owner Group'],
qSortCriterias: [{
qSortByState: 0,
qSortByFrequency: 0,
qSortByNumeric: 0,
qSortByAscii: 1,
qSortByLoadOrder: 1,
qSortByExpression: 0,
qExpression: {
qv: '',
},
qSortByGreyness: 0,
}],
},
}],
qMeasures: [{
qDef: {
qDef: '=Avg([Case Duration Time])',
qLabel: 'Custom Measure Label',
},
qSortBy: {
qSortByState: 0,
qSortByFrequency: 0,
qSortByNumeric: -1,
qSortByAscii: 0,
qSortByLoadOrder: 1,
qSortByExpression: 0,
qExpression: {
qv: '',
},
},
qAttributeExpressions: [{
qExpression: "If(firstsortedvalue( Priority, -Aggr(Count({<[Cases Open/Closed]={'Open Cases'}>}Distinct [%CaseId] ),[Case Owner Group],Priority))='Low', rgb(39,110,39), If(firstsortedvalue( Priority, -Aggr(Count({<[Cases Open/Closed]={'Open Cases'}>}Distinct [%CaseId] ),[Case Owner Group],Priority))='Medium', rgb(255,207,2), If(firstsortedvalue( Priority, -Aggr(Count({<[Cases Open/Closed]={'Open Cases'}>}Distinct [%CaseId] ),[Case Owner Group],Priority))='High', rgb(249,63,23))))",
id: 'colorByExpression',
}],
}],
qInterColumnSortOrder: [
1,
0,
],
qSuppressZero: false,
qSuppressMissing: true,
},
color: {
auto: false,
mode: 'byExpression',
expressionIsColor: true,
},
legend: {
show: true,
},
dimensionAxis: {
show: 'labels',
},
measureAxis: {
show: 'labels',
spacing: 2,
},
}
}
Insert cell
{
const { QdtViz } = QdtComponents;
QdtViz({
element,
app,
options: {
options,
height: 400,
},
});
}
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more