如何在固定点的快速图表中手动添加标记 [英] How to manually add marker in swift charts at fixed point

查看:67
本文介绍了如何在固定点的快速图表中手动添加标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 https://github.com/danielgindi/Charts

我正在尝试在散点图启动时手动添加标记。

I am trying to add marker manually on launch of Scatter graph.

我正在使用 chartView.highlightValue (x:7,y:9,dataSetIndex:1,callDelegate:false)
,但是基于不同类型的数据在图形上给出了不同的点。这里的dataSetIndex是什么关系?
我正在寻找的是将标记粘贴在 x:7,y:9

请提出我该如何实现?

推荐答案

dataSetIndex是ScatterChartDataSet内部条目的索引

dataSetIndex is index of entries inside the ScatterChartDataSet

ScatterChartDataSet(entries: [dataSet0, dataSet1, dataSet2])

您需要调用具有x:7和y:9值的正确的dataSetIndex

you need to call the right dataSetIndex that have x:7 and y:9 value

这篇关于如何在固定点的快速图表中手动添加标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆