|
// add your additional code here
<AccumulationChartComponent id="pie-chart" enableSmartLabels={true} tooltip={{ enable: true }} loaded={this.onChartLoad.bind(this)} >
// add your additional code here
onChartLoad(args) {
document.getElementById("pie-chart").setAttribute("title", "");
for (var i = 0; i < args.accumulation.series[0].dataSource["length"]; i++) {
var stroke = document
.getElementById("pie-chart_chart_legend_shape_" + i)
.getAttribute("fill");
document
.getElementById("pie-chart_chart_legend_shape_marker_" + i)
.setAttribute("fill", stroke);
}
}
// add your additional code here |
|
// add your additional code here
<AccumulationChartComponent
id="pie-chart"
title="Project Cost Breakdown"
legendSettings={{
visible: true,
shapeHeight: 20,
shapeWidth: 8,
position: "Left",
width: "200px",
height: "100px"
}}
enableSmartLabels={true}
tooltip={{ enable: true }}
loaded={this.onChartLoad.bind(this)} >
// add your additional code here |
|
// add your additional code here
<AccumulationAnnotationsDirective>
<AccumulationAnnotationDirective
content="<div id=center_title >Total Logged Time</div>"
region="Series"
coordinateUnits="Pixel"
x="50%"
y="47%"
/>
<AccumulationAnnotationDirective
content="<div id=center_title1 >62:33:17</div>"
region="Series"
coordinateUnits="Pixel"
x="50%"
y="55%"
/>
</AccumulationAnnotationsDirective>
// add your additional code here |
|
// add your additional code here
legendSettings={{
visible: true,
shapeHeight: 25,
shapeWidth: 8,
position: "Left",
width: "300px",
height: "140px",
enablePages: false
}}
// add your additional code here
|
|
// add your additional code here
const clickHandler = () => {
this.chartInstance.print();
};
return (
<div style={{ width: "inherit", height: "inherit" }}>
<style>{SAMPLE_CSS}</style>
<button value="print" onClick={clickHandler}>
Print
</button>
{data1.length > 0 ? (
<AccumulationChartComponent
id="container"
ref={chart => (this.chartInstance = chart)}
// add your additional code here |
|
// add your additional code here
<ChartComponent id="charts" textRender={this.textRender.bind(this)} >
// add your additional code here
</ChartComponent>
// add your additional code here
textRender(args) {
if (args.text == "0") {
args.text = "";
}
}
// add your additional code here
|
|
// add your additional code here
export let data1 = [
{ x: "USA", y: 10, value: "USA : 10" },
{ x: "GBR", y: 27, value: "GBR : 27" },
{ x: "CHN", y: 26, value: "CHN : 26" }
];
// add your additional code here
marker={{
dataLabel: {
visible: true,
showZero: true,
position: "Outer",
name: "value"
}
}}
// add your additional code here
|