ChartsOrg / ChartsOrg/Charts

Combined Chart Line chart doesn't change when grouped bars are added

Open
#2,633 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to make something similar to this

![jom8o](https://user-images.githubusercontent.com/6707443/28536256-11a9d6c2-7075-11e7-8d1a-adbd19557b83.png)

Im going to have 4 BarChartDataSets grouped, and 2 LineChartDataSets, each data set has 7 data points, the user can add or remove these datasets at will

The bars seem to be grouping fine, and the line chart shows all 7 points

but as I add more BarChartDataSets to the chart, the bars go off the right side of the chart, the line chart stays the same, here is an image sequence of me starting with a single LineChartDataSet, then adding BarChartDataSets one by one, some of the bars have a value of 0, so its hard to see the group, look for the 0 label at the bottom

screen shot 2017-07-24 at 1 34 05 pm
screen shot 2017-07-24 at 1 34 28 pm
screen shot 2017-07-24 at 1 34 40 pm
screen shot 2017-07-24 at 1 34 47 pm
screen shot 2017-07-24 at 1 34 53 pm

How can i stop the bars from going off the right of the chart?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the combined chart with one line dataset and progressively added grouped bar datasets, using the screenshots and dataset counts in the issue as the reference. Trace how adding bar datasets updates the chart's horizontal range and layout; done means all grouped bars and line points remain within the chart as datasets are added or removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.