Skip to content

Commit

Permalink
add another thin bars clipping misrender
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Dec 11, 2023
1 parent aea27ca commit a3df179
Showing 1 changed file with 178 additions and 0 deletions.
178 changes: 178 additions & 0 deletions demos/high-low-bands.html
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,184 @@

let u = new uPlot(opts, data, document.body);
}

{
let data = [
[
1700078400000,
1700078700000,
1700153400000,
1700156700000,
1700157000000,
1700162400000,
1700232900000,
1700233200000,
1700238600000,
1700275800000,
1700578500000,
1700595300000,
1700595600000,
1700602200000,
1700665500000,
1700665800000,
1700683200000,
1700683500000,
1700684100000,
1700744700000,
1700767200000,
1700769900000,
1700831400000,
1700831700000,
1700841000000,
1700848200000,
1700865900000,
1701190200000,
1701194700000,
1701202200000,
1701226200000,
1701254100000,
1701267600000,
1701268800000,
1701273600000,
1701344700000,
1701345000000,
1701345300000,
1701345600000,
1701345900000,
1701346200000,
1701346500000
],
[
5,
1,
1,
8,
2,
1,
1,
1,
1,
3,
2,
3,
2,
1,
1,
3,
4,
2,
1,
1,
3,
2,
2,
2,
3,
2,
2,
2,
4,
2,
1,
1,
2,
1,
1,
4,
0,
0
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4, // <-- value!
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
];

data[2] = data[2].map((v, i) => data[1][i] + v);

const paths = uPlot.paths.bars({
align: 0,
size: [0.6, 200],
});

const opts = {
width: 800,
height: 300,
title: 'Very thin bars',
ms: 1,
bands: [
{
series: [
2,
1
],
dir: -1
}
],
series: [
{},
{
fill: 'rgba(255,0,0,1)',
width: 0,
// stroke: 'rgba(255,0,0,0.5)',
// width: 1,
paths,
points: {
show: false,
}
},
{

fill: 'rgba(0,0,255,1)',
// stroke: 'rgba(0,0,255,0.5)',
// width: 1,
width: 0,
paths,
points: {
show: false,
}
}
],
};

let u = new uPlot(opts, data, document.body);
}
</script>
</body>
</html>

0 comments on commit a3df179

Please sign in to comment.