Skip to content

Second to last value in stacked BarChart not drawn when the last value is zero #3984

Description

@igorkulman

What did you do?

I have created a stacked BarChart with 3 values, just like in the StackedBarChartViewController sample.

The values are in form of [val1, val2, val3]. Sometimes val3 is 0

What did you expect to happen?

I expected the BarChart to be drawn properly, every non-zero value to be shown

What happened instead?

Anytime val3 is 0 then val2 does not get drawn. Only its label is visible:

Simulator Screen Shot - iPhone X - 2019-05-04 at 16 01 01

Charts Environment

Charts version/Branch/Commit Number:
Xcode version: 10.2.1
Swift version: 5
Platform(s) running Charts: iOS
macOS version running Xcode: 10.14.4

Demo Project

In the sample project open StackedBarChartViewController and change the setChartData method to sometimes or always set val3 = 0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions