同步-融合React图表标题在Graph内。

问题描述 投票:0回答:1

我正在使用react syncfusion图表,所以我有要求在图表中显示一个日志,我正在尝试用Annotation指令,但无法在图表中显示。如果任何人有关于它的想法

syncfusion
1个回答
0
投票

我们已经分析了你的查询。我们建议你将标题呈现在图形内作为注释。我们已经准备了示例供您参考。请查看下面的示例和代码片段。

import { ChartAnnotation, AnnotationsDirective, AnnotationDirective } from '@syncfusion/ej2-react-charts';
<ChartComponent >
 <Inject services={[ChartAnnotation]}/>
 <AnnotationsDirective>
    <AnnotationDirective content='<div id="chart_title_annotation" style="font-size:15px; font-style=Segoe UI"> Inflation - Consumer Price</div>' region='Chart' coordinateUnits='Pixel' x='50%' y='10%'>
    </AnnotationDirective>
</AnnotationsDirective>
</ChartComponent>

enter image description here

https:/stackblitz.comeditreact-2wnudf?file=index.js。

祝贺你,Durga G

© www.soinside.com 2019 - 2024. All rights reserved.