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

BarChart does not render with multiple data sets #2705

Closed
software-2 opened this issue Aug 11, 2017 · 2 comments
Closed

BarChart does not render with multiple data sets #2705

software-2 opened this issue Aug 11, 2017 · 2 comments

Comments

@software-2
Copy link

I'm trying to create a bar chart using multiple data sets, but when I try to provide multiple sets to the BarChartView no bars are rendered.

let barView = BarChartView()

let set1 = BarChartDataSet()
set1.addEntry(BarChartDataEntry(x: 1, y: 1))
let set2 = BarChartDataSet()
set2.addEntry(BarChartDataEntry(x: 2, y: 2))

barView.data = BarChartData(dataSets: [set1, set2])

contentView = barView

In the above example, I would expect two bars to be displayed. However, no bars will appear at all.

If I provide only one data set, the chart will render as expected.

barView.data = BarChartData(dataSets: [set1])
@liuxuan30
Copy link
Member

take a look at ChartsDemo multiple bars chart if you missed anything.

@9527001
Copy link

9527001 commented Aug 25, 2017

@liuxuan30 📊支持左右两侧Y轴值不一样 比如,左侧是最大是100 右侧最大值是1 000 000 ?

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