You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Stats Refresh] When charts have no data, show grey bars #11876
In the iOS version of the Charts, bar gradients have not been implemented. With #11887 , light grey bars were added to empty charts while we figure out if we can do gradients.
There are two outstanding PRs attempting to do so in the library, but both are over a year old, and are build off of older version of the library: ChartsOrg/Charts#3225 ChartsOrg/Charts#3533
There are two (rather old) issues that may be useful if we decide to attempt this ourselves. ChartsOrg/Charts#2722 - user modified the library's BarChartRenderer directly. ChartsOrg/Charts#2515 - user added a CAGradientLayer to all the bars (with a few gotchas).
Activity
planarvoid commentedon Jun 7, 2019
I'm not sure if it helps in any way but this is the code that build the empty data set on Android
The value of all the columns is 1F, the color goes from
primary_50totransparent. Let me know if something's not clear!ScoutHarris commentedon Jun 7, 2019
Thanks @planarvoid ! I'm sure this will come in handy.
ScoutHarris commentedon Jun 12, 2019
In the iOS version of the Charts, bar gradients have not been implemented. With #11887 , light grey bars were added to empty charts while we figure out if we can do gradients.
There are two outstanding PRs attempting to do so in the library, but both are over a year old, and are build off of older version of the library:
ChartsOrg/Charts#3225
ChartsOrg/Charts#3533
There are two (rather old) issues that may be useful if we decide to attempt this ourselves.
ChartsOrg/Charts#2722 - user modified the library's
BarChartRendererdirectly.ChartsOrg/Charts#2515 - user added a
CAGradientLayerto all the bars (with a few gotchas).ScoutHarris commentedon Jul 25, 2019
With these changes, we're now showing grey bars:
#11887
#11971
As stated previously, bar gradients were not implemented in the iOS Charts library. And doing so manually will take a bit of effort.
I'm closing this as Done. If we really have to have gradient bars, we should discuss the effort vs benefit with another request.