Commit 577564cf authored by nikogu's avatar nikogu

fixed charts padding

parent 20bf3264
...@@ -41,7 +41,7 @@ class MiniArea extends PureComponent { ...@@ -41,7 +41,7 @@ class MiniArea extends PureComponent {
height: height + 54, height: height + 54,
animate, animate,
plotCfg: { plotCfg: {
margin: [36, 0, 30, 0], margin: [36, 5, 30, 5],
}, },
legend: null, legend: null,
}); });
...@@ -74,28 +74,22 @@ class MiniArea extends PureComponent { ...@@ -74,28 +74,22 @@ class MiniArea extends PureComponent {
}, },
}; };
const view = chart.createView(); chart.tooltip({
view.tooltip({
title: null, title: null,
crosshairs: false, crosshairs: false,
map: { map: {
name: 'y', title: null,
name: 'x',
value: 'y',
}, },
}); });
const view = chart.createView();
view.source(data, dataConfig); view.source(data, dataConfig);
view.area().position('x*y').color(color).shape('smooth') view.area().position('x*y').color(color).shape('smooth')
.style({ fillOpacity: 1 }); .style({ fillOpacity: 1 });
chart.on('tooltipchange', (ev) => {
const item = ev.items[0];
const { title } = item;
item.title = '';
item.name = '';
item.value = `${title} : ${item.value}`;
});
if (line) { if (line) {
const view2 = chart.createView(); const view2 = chart.createView();
view2.source(data, dataConfig); view2.source(data, dataConfig);
......
...@@ -42,7 +42,7 @@ class MiniBar extends PureComponent { ...@@ -42,7 +42,7 @@ class MiniBar extends PureComponent {
forceFit: fit, forceFit: fit,
height: height + 54, height: height + 54,
plotCfg: { plotCfg: {
margin: [36, 0, 30, 0], margin: [36, 5, 30, 5],
}, },
legend: null, legend: null,
}); });
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
bottom: -34px; bottom: -34px;
width: 100%; width: 100%;
& > div { & > div {
margin: 0 -5px;
overflow: hidden; overflow: hidden;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment