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
Im trying to program a spending limit with rounded corners and my current chart is this:
I use a horizontal bar chart which is split into spent and remaining, assigned values here:
val barChart = HorizontalBarChart(LocalContext.current)
val entries = listOf(
BarEntry(0f, floatArrayOf(spent, remaining))
)
val dataSet = BarDataSet(entries, "").apply {
colors = listOf(spentColor, Color.rgb(64, 64, 64)) // Spent color and remaining color
valueTextColor = Color.WHITE
valueTextSize = 16f
setDrawValues(false) // Hide the value labels on the bars
}
However, when setting the renderer like here:
renderer = RoundedHorizontalBarChartRenderer(this, ChartAnimator(), ViewPortHandler())
(renderer as RoundedHorizontalBarChartRenderer).setRoundedPositiveDataSetRadius(20f) // Set the corner radius
as needed
The bar chart is loaded in as I can highlight it however there is no color at all, it is the same color as the background (commenting out setting the custom renderer fixes this)
I think the RoundedHorizontalBarChartRenderer doesn't work with split bar charts. If this is not the case if someone can let me know what I am doing wrong, if it is the case then I would be happy to give a go fixing it.
The text was updated successfully, but these errors were encountered:
The change comes from here PhilJay#5420 and I recommend to start to debug
I have been debugging and I just wanted to ask if there are any example uses of either of the rounded bar chart renderers (apart from the pie chart renderer), as I have not found any working use cases? It would help a lot if I knew the intended way to use the custom renderer of the bar charts.
Im trying to program a spending limit with rounded corners and my current chart is this:
I use a horizontal bar chart which is split into spent and remaining, assigned values here:
However, when setting the renderer like here:
as needed
The bar chart is loaded in as I can highlight it however there is no color at all, it is the same color as the background (commenting out setting the custom renderer fixes this)
I think the RoundedHorizontalBarChartRenderer doesn't work with split bar charts. If this is not the case if someone can let me know what I am doing wrong, if it is the case then I would be happy to give a go fixing it.
The text was updated successfully, but these errors were encountered: