如何在我的 Angular 2 应用程序中绘制概率分布图。
我尝试使用 wijmo 注释行。它使用起点和终点坐标工作。
我需要使用 xy 数据坐标点绘制线。
还尝试了 wj-flex-chart-annotation-line 的附件属性(DataIndex 和 DataCoordinate)。我需要如何使用附件选项指定数据点。需要为带有附件选项的数据类型点提供什么值?
<wj-flex-chart [itemsSource]="data" [chartType]="'Spline'" [bindingX]="'country'">
<wj-flex-chart-axis [wjProperty]="'axisX'" [title]="titleX" [labels]="false"></wj-flex-chart-axis>
<wj-flex-chart-axis [wjProperty]="'axisY'" [title]="titleY"></wj-flex-chart-axis>
<wj-flex-chart-series [binding]="'sales'"></wj-flex-chart-series>
<wj-flex-chart-annotation-layer>
<wj-flex-chart-annotation-line [position]="2" [start]="{x: 250, y: 0}" [end]="{x: 250, y: 300}" ></wj-flex-chart-annotation-line>
<wj-flex-chart-annotation-line [attachment]="'DataIndex'" [wjProperty]="'axisX'" [pointIndex]="2"></wj-flex-chart-annotation-line>
</wj-flex-chart-annotation-layer>
</wj-flex-chart>
data = [
{'country': "US", 'downloads': 3457, 'sales': 1681.374337182966},
{'country': "Germany", 'downloads': 467, 'sales': 5821.869030096296},
{'country': "UK", 'downloads': 12151, 'sales': 2260.865004748749},
{'country': "Japan", 'downloads': 19762, 'sales': 2331.3376444697155},
{'country': "Italy", 'downloads': 13341, 'sales': 6264.880417785565},
{'country': "Greece", 'downloads': 1088, 'sales': 80.409117985476}
];
使用的参考链接是:
谢谢你。