-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to just draw one circle value for LineChartView #2391
Comments
combine scatter chart with one point and line chart |
set |
HI @liuxuan30 Follow your idea, i am trying to subclass But my problem is i can't find the parameter used by the render init. I think i am wrong. Here's my code. Thank you for any help!
|
just like how line chart view does: internal override func initialize()
{
super.initialize()
renderer = LineChartRenderer(dataProvider: self, animator: _animator, viewPortHandler: _viewPortHandler)
} |
HI @liuxuan30 There are errors like
|
are you defining outside of the framework, so restricted by |
@liuxuan30 You tell to override |
@liuxuan30 Seems as though these properties that we would need in order to write our own custom renderer are internal, so we wouldn't be able too. Is it possible to create a protocol function that allows us to decide whether a circle is drawn at a specific point. So that you can keep these properties internal. |
Just in case anyone else is looking to do the same... the easiest solution is to draw a second data set that consists of only a single value. Turn off the circles on the first set that produces the line and then turn on the circle for the second set. You can use
|
@MobileVet You're the best man! Thank you very much!!!! 🚀 |
import Foundation /// Chart that draws lines, surfaces, circles, ...
} |
这个方法经过我的亲自实践,确实是可行的,就是在原有的点上加一个
想到这个方法真的很鸡贼 |
我的需求是:点击到哪里,只显示选中点,其他的不显示。方法如下,仅供学习参考 1.首先设置图标: 2.定义一个临时选中点 3.通过点击代理,将选中的Entry传过来,并刷新updateChartData
|
As the title described, i want to draw only one circle one a specific value, but right now it draw all the values.
I want
I got
code
How should i make it just show one circle ?
The text was updated successfully, but these errors were encountered: