Closed LeeWeeder closed 3 months ago
Hi @LeeWeeder , thank you for you pr, this is really valuable for us. A reviewed your PR and it seems there is no problem, but now we have this feature, I would like you to add that feature to the row chart as well, so that this feature is complete and available in all charts. π
Note: the start position for the row chart indicators will be top of chart and end position will be bottom of chart, so by default give end position for row chart indicators
Working on this.
Hello @ehsannarmani. I have implemented the feature for RowChart but while doing so, it also introduced major breaking changes.
Instead of
LineChart(
...,
indicatorProperties = IndicatorProperties(
textStyle = TextStyle(fontSize = 12.sp, fontFamily = ubuntu, color = Color.White),
count = 4,
position = IndicatorProperties.Position.End // Define the position, defaults to Start
),
...
)
The implementation will be as follows
LineChart(
...,
indicatorProperties = HorizontalIndicatorProperties(
textStyle = TextStyle(fontSize = 12.sp, fontFamily = ubuntu, color = Color.White),
count = 4,
position = IndicatorPosition.Horizontal.End// Define the position, defaults to Start
),
...
)
The implementation for LineChart and ColumnChart is the same.
[!NOTE] I refactored the
IndicatorProperties.Position
toIndicatorPosition
for simplicity of usage.[!NOTE]
IndicatorProperties
becameHorizontalIndicatorProperties
For RowChart, will use
RowChart(
...,
indicatorProperties = VerticalIndicatorProperties(
textStyle = TextStyle(fontSize = 12.sp, fontFamily = ubuntu, color = Color.White),
count = 4,
position = IndicatorPosition.Vertical.Top // Define the position, defaults to Bottom
),
...
)
Hi, cool. @LeeWeeder But why you closed the pr?
Hello @ehsannarmani. I didn't know renaming the branch would automatically close a PR. I apologize for that. I didn't notice until you pointed it out to me, my bad. I will just restore the branch and reopen the PR. Again, sorry for the inconvenience.
Hi @LeeWeeder , It's ok i know. Thank you so much for your efforts ππ
In this issue #11, I have requested a feature to position the indicators to the start or end of the chart for the line and column charts.
Edit: Now also included RowCharts.
Samples
Column Chart
Line Chart
Thank you!