Skip to content
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

Drawing circles for values on the radar chart #138

Closed
liuxuan30 opened this issue Jun 10, 2015 · 13 comments
Closed

Drawing circles for values on the radar chart #138

liuxuan30 opened this issue Jun 10, 2015 · 13 comments
Labels

Comments

@liuxuan30
Copy link
Member

Say it is a radar chart view, can ios-charts draw a dot circle at each data point (a specific yValue and xIndex)?

@danielgindi
Copy link
Collaborator

Can you provide an example?

@liuxuan30
Copy link
Member Author

radar

I capture this chart from a JS radar chart. For each data point, it has a doct circle. When highlighting, the dot circle can be hollow (filled by white color, stroke with the old color)

Current ios-chart radar chart don't have a dot. It not easy to see if there is a data point. Having some dots will make it easier.

@danielgindi danielgindi changed the title can radar chart support drawing a dot circle if we highlight a data point? Drawing circles for values on the radar chart Jun 11, 2015
@liuxuan30
Copy link
Member Author

@danielgindi Do you think this is worthy to have? I am about to finish implementing this feature on my side.

@liuxuan30
Copy link
Member Author

Seems only I have this requirement. I will close it. If anyone raise same request, i could share my code.

@alexwillrock
Copy link

this is a very cool feature, it is strange that the developers did not include it by default, really need this feature
thx

@liuxuan30
Copy link
Member Author

@alexwillrock you are the first one to ask for a dot since Jun..

You could add the dots just like drawCircles in line chart renderer into Radar chart renderer. I will file a PR later (I have implemented, just need to think about how to adopt it for ios-charts)

@shrikantwalekar-tudip
Copy link

@liuxuan30, I need the same feature you are talking about. would you please file PR.

@liuxuan30
Copy link
Member Author

I actually did it already, PR is right above your comment.

@shrikantwalekar-tudip
Copy link

@liuxuan30 , I did that . and able to show circle on tap of point.
I want my chart to look like the image above.

but not able to plot single point or points like line chart, in case- if there are multiple radar Chart Data sets and if any data set contains only one point then that point is not visible. Also the circles are visible only after tap. Please guide me if I am doing something wrong.
screen shot 2016-02-03 at 8 57 07 pm

@liuxuan30
Copy link
Member Author

you should check out radar chart renderer highlight method to achieve your goals. Either highlight all data sets or just not highlight any of them. up to you.

@shrikantwalekar-tudip
Copy link

Hey @liuxuan30, so sorry for disturbing u again, here I am sharing little piece of code, plz tell me how can I use radar chart renderer highlight method to achieve my goal, I am very new to this technology, plz help me out

        radarChartDataSetTemp.lineWidth = 2
        radarChartDataSetTemp.drawValuesEnabled = true            
        finalRadarChartDataSet.append(radarChartDataSetTemp)
    }               
    chartView.drawHighlightCircle = true
    chartView.circleOuterRadius = 4
    chartView.circleFillColor = colorsArray[j]
    chartView.circleInnerRadius = 2
    chartView.circleStrokeAlpha = 1
    chartView.circleStrokeWidth = CGFloat(2.0)

    chartView.delegate = self
    let radarChartData = RadarChartData(xVals: dataPoints, dataSets: finalRadarChartDataSet)
    chartView.data = radarChartData

// chartView.highlightPerTapEnabled = false
chartView.drawMarkers = false
chartView.yAxis.drawLabelsEnabled = false
radarChartData.setValueFont(UIFont.boldSystemFontOfSize(15.0))

@liuxuan30
Copy link
Member Author

I mean you have to figure out what you want to do. A dot when highlighting, or a dot always in the chart? It's different.
For highlighting, you have to override drawHighlighted method to get your work done. For normal rendering, you have to override drawDataSet. They are both in radar chart renderer.
If you want to highlight all data for same xIndex, you may look at chart highlighter code as well.
If you are beginner, I suggest you walk through the code first. These customizations requires a good understanding of the code.

@CivelXu
Copy link

CivelXu commented Nov 19, 2019

How highlighted all circles in radar chart?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants