Replies: 13 comments 14 replies
-
Hello! I’m afraid this isn’t supported, but we will be adding such functionality in the future. Unfortunately, I don’t think there’s much in the way of a trick that would enable you to implement something like this, other than creating a custom |
Beta Was this translation helpful? Give feedback.
-
There hasn’t been any activity here for four weeks. If no activity occurs over the next week, this issue will be closed as stale. |
Beta Was this translation helpful? Give feedback.
-
Hello, Thanks for the great package. We have the same need for this feature, but with a line chart. Would really appreciate if you could make this enhancement! Thank you! |
Beta Was this translation helpful? Give feedback.
-
Could you elaborate on that, @sprout-apps? While a column in a column chart has two key y values—the top and the bottom—a point in a line chart has only one. |
Beta Was this translation helpful? Give feedback.
-
![Screenshot_2023-08-01-20-47-17-243_com laul trackaid](https://github.com/patrykandpatrick/vico/assets/2975027/e003b0c8-909c-41ba-8b0a-1df35263692b)
Hey !
I am sorry: I completely forgot to mention that I finally found a way to display columns not starting from 0. The idea is to put 2 different columns one on top of the other.
Let's take a simple example :
• You want a vertical bar / column from y=1 to y=4 at a x= 2
• You create two bars :
• A "back" bar from y=0 to y=4 at a x= 2
• A "top" bar from y=0 to y=1 at a x= 2
• And then add the same background color on the "top" bar
At the end I got what I put in attachment
I hope it'll give ideas to you ;)
|
Beta Was this translation helpful? Give feedback.
-
@patrickmichalik An example in our case would be a baby growth chart. Baby's weight and height don't start with zero, so zero base doesn't work very well for the chart. It ends up with a lot of white space and the actual values don't get spread out as much, so the chart isn't that readable. It's better to start just below the birth value. Let me know if this makes sense. I can attach sample images. |
Beta Was this translation helpful? Give feedback.
-
Interesting, @Laul! I’m glad that you’ve found a workaround. Thanks for sharing. |
Beta Was this translation helpful? Give feedback.
-
Got it, @sprout-apps. That is, however, a different feature than what’s been requested here, and Vico already has it. You can use object : AxisValuesOverrider<ChartEntryModel> {
override fun getMinY(model: ChartEntryModel) = model.minY
} |
Beta Was this translation helpful? Give feedback.
-
@patrickmichalik Perfect, thanks for your help! |
Beta Was this translation helpful? Give feedback.
-
You’re welcome, @sprout-apps! |
Beta Was this translation helpful? Give feedback.
-
Hi ! To do so, I use the ColumnChart.MergeMode.Stack to create my stacked column. Works well, I even have the markers with proper values . Would you have an idea how I could properly fix my problem ? |
Beta Was this translation helpful? Give feedback.
-
@patrickmichalik Is there any update on adding support for this type of y != 0 column chart? We're looking into adding back the "dumbbell" style for our blood pressure charts. Thank you for your time! |
Beta Was this translation helpful? Give feedback.
-
Vico 2.0.0 Alpha 15 introduced candlestick charts. As discussed above, a candle can serve as a column that spans any range of y values. Here’s a quick example: val bottomY = listOf(1f, 4f, 3f, 2f)
val topY = listOf(8f, 12f, 8f, 6f) candlestickSeries(opening = bottomY, closing = topY, low = bottomY, high = topY) Candles and columns have different default styling, but the appearance of a |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Hello,
For many reasons, I am considering switching the charting lib I currently use (Kellochart, adapted from Hellochart) to yours. However, I have a requirement to be able to draw charts that contains columns not starting from y=0. For example, I need to draw a column at x=0 between y=2 and y=6. Of what I found, your implementation only allows to make a column from 0 to abs(y)>0... Unless I missed something ? If not "natively" supported, would you suggest a work around? Do you have some similar examples ? Below is a picture of my current view with Kellochart.
Module
compose
views
compose-m2
compose-m3
core
(select if none of the above apply)To reproduce
N/A
Expected behavior
N/A
Screenshots
Android versions
N/A
Additional context
N/A
Beta Was this translation helpful? Give feedback.
All reactions