|
|
@ -13,7 +13,7 @@ |
|
|
|
var pod = new ChartwerkBarPod( |
|
|
|
var pod = new ChartwerkBarPod( |
|
|
|
document.getElementById('chart'), |
|
|
|
document.getElementById('chart'), |
|
|
|
[ |
|
|
|
[ |
|
|
|
{ target: 'test11', datapoints: getData(), matchedKey: 'm-1', color: 'red' }, |
|
|
|
{ target: 'test11', datapoints: getData(), matchedKey: 'm-1', color: 'red' }, |
|
|
|
{ target: 'test12', datapoints: [[100, 10], [200, 20], [300, 10]], matchedKey: 'm-1', color: 'green' }, |
|
|
|
{ target: 'test12', datapoints: [[100, 10], [200, 20], [300, 10]], matchedKey: 'm-1', color: 'green' }, |
|
|
|
{ target: 'test21', datapoints: [[130, 10], [230, 26], [330, 15]], matchedKey: 'm-2', color: 'yellow'}, |
|
|
|
{ target: 'test21', datapoints: [[130, 10], [230, 26], [330, 15]], matchedKey: 'm-2', color: 'yellow'}, |
|
|
|
{ target: 'test22', datapoints: [[130, 10], [230, 27], [330, 10]], matchedKey: 'm-2', color: 'blue' }, |
|
|
|
{ target: 'test22', datapoints: [[130, 10], [230, 27], [330, 10]], matchedKey: 'm-2', color: 'blue' }, |
|
|
@ -29,7 +29,11 @@ |
|
|
|
maxBarWidth: 20, |
|
|
|
maxBarWidth: 20, |
|
|
|
zoomEvents: { |
|
|
|
zoomEvents: { |
|
|
|
scroll: { zoom: { isActive: false }, pan: { isActive: false } }, |
|
|
|
scroll: { zoom: { isActive: false }, pan: { isActive: false } }, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
annotations: [ |
|
|
|
|
|
|
|
{ key: 'm-1', color: 'red' }, |
|
|
|
|
|
|
|
{ key: 'm-2', color: 'green' } |
|
|
|
|
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
console.time('render'); |
|
|
|
console.time('render'); |
|
|
@ -39,23 +43,14 @@ |
|
|
|
function getData() { |
|
|
|
function getData() { |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
[100, 15], [110, 20], [300, 10], |
|
|
|
[100, 15], [110, 20], [300, 10], |
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
[100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], [100, 15], [110, 20], [300, 10], |
|
|
|
|
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
</html> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
|
|
.overlay { |
|
|
|
|
|
|
|
fill: black; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|