Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150642 | Jan 14,2020 12:10 PM UTC | Jan 15,2020 12:18 PM UTC | React - EJ 2 | 1 |
![]() |
Tags: Chart |
<AccumulationChartComponent animationComplete={this.onAnimationComplete.bind(this)} >
</AccumulationChartComponent>
<div id="center_title" style={{ visibility: 'hidden', position: 'absolute'}}>72%</div>
onAnimationComplete(args) {
let centerTitle = document.getElementById('center_title');
centerTitle.style.fontSize = '32px';
let rect = centerTitle.getBoundingClientRect();
centerTitle.style.top = (args.accumulation.origin.y + args.accumulation.element.offsetTop - (rect.height / 2)) + 'px';
centerTitle.style.left = (args.accumulation.origin.x + args.accumulation.element.offsetLeft - (rect.width / 2)) + 'px';
centerTitle.style.visibility = 'visible';
}; |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.