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

Bubble charts: Can i set the size same to all the bubbles? #2456

Closed
01sunjon opened this issue May 19, 2017 · 2 comments
Closed

Bubble charts: Can i set the size same to all the bubbles? #2456

01sunjon opened this issue May 19, 2017 · 2 comments

Comments

@01sunjon
Copy link

i have a bubble chart and some bubbles are very large.i want to set the bubble chart size same for all. i have tried to use
var dataEntries1 : [BubbleChartDataEntry] = BubbleChartDataEntry
for i in 0..<dataPoints.count {
if values1[i] != 0
{
let dataEntry = BubbleChartDataEntry(xIndex: i, value: values1[i], size: 5.0)
dataEntries1.append(dataEntry)

        }
    }
    let set1: BubbleChartDataSet = BubbleChartDataSet(yVals: dataEntries1, label: "First Set")
    set1._maxSize = 30

even i have tried to set all the bubbles value to its size 30. The bubble sizes are varying its sizes. I want all of them to be a same size.Can i do this.??

@thierryH91200
Copy link
Contributor

it's ok for me
update chart V3.0.2

      for index in 0..<4
       {
           entries.removeAll()
           let x = datas[index][0]
           let y = datas[index][1]
           entries.append(BubbleChartDataEntry(x: x, y: y, size: CGFloat(15  )))
           
           // MARK: BubbleChartDataSet
           let set = BubbleChartDataSet(values: entries, label: label[index])
           set.setColor(colors[index])
           set.valueTextColor = NSUIColor.black
           set.valueFont = NSUIFont.systemFont(ofSize: CGFloat(10.0))
           set.drawValuesEnabled = true
           set.normalizeSizeEnabled = false
           set.formSize = 30.0
           
           data.addDataSet(set)
       }

capture d ecran 2017-05-19 a 09 27 03

@liuxuan30
Copy link
Member

Thanks!

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

No branches or pull requests

3 participants