You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/13 13:49:56 UTC
[GitHub] ajgil commented on issue #5188: Bullet chart unhashable type: 'dict'
ajgil commented on issue #5188: Bullet chart unhashable type: 'dict'
URL: https://github.com/apache/incubator-superset/issues/5188#issuecomment-396944095
Made changes on code.. Not found. Here code, im not sure
```python
export default function nvd3Vis(slice, payload) {
let chart;
let colorKey = 'key';
const isExplore = $('#explore-container').length === 1;
let data;
if (payload.data) {
#:data = payload.data.map(x => ({
# ...x, key: formatLabel(x.key, slice.datasource.verbose_map),
#}));
if (Array.isArray(payload.data)){
data = payload.data.map(x => ({
...x, key: formatLabel(x.key, slice.datasource.verbose_map),
}));
} else {
data = payload.data;
}
slice.container.html('');
slice.clearError();
let width = slice.width();
const fd = slice.formData;
const barchartWidth = function () {
let bars;
if (fd.bar_stacked) {
bars = d3.max(data, function (d) { return d.values.length; });
} else {
bars = d3.sum(data, function (d) { return d.values.length; });
}
if (bars * minBarWidth > width) {
return bars * minBarWidth;
}
return width;
};
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org