Esri / Esri/cedar

Sparkline Support

Open
#472 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Handlebars
Stars
265
Forks
236
PR merge metrics
No merged PRs in 30d

Description

Here is a custom definition that could be used, should cedar ever move to support sparklines. `...` indicating values that were specific to my definition generation and don't need to be mirrored. Primarily lean on the `'type': 'line'`, and the `'overrides':` portions.

```
let definition = {
'type': 'line',
'datasets': ...,
'series': [{
'source': ...,
'category': {
'field': ...',
'label': ...
},
'group': ..,
'value': {
'field': ...,
'label': ...
}
}],
'overrides': {
'type': 'serial',
'theme': 'calcite',
'autoMargins': false,
'marginLeft': 0,
'marginRight': 3,
'marginTop': 0,
'marginBottom': 0,
'graphs': [{
'bullet': 'none',
// 'lineColor': '#4c4c4c', // '#a9ec49'
}],
'valueAxes': [{
'gridAlpha': 0,
'axisAlpha': 0,
'minimum': -1,
}],
'categoryAxis': {
'gridAlpha': 0,
'axisAlpha': 0,
'startOnAxis': true,
}
},
'legend': {},
'style': {}
};
return definition;
})
});
```

Which leads to a sparkline that looks like this
![https___zebra-dc_hubqa_arcgis_com_4200_dashboard_edit](https://user-images.githubusercontent.com/14302394/76020643-a278e400-5ed8-11ea-9df4-37ead8d56b9f.jpg)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.