-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor BarChart with DrawScope functions #62
base: main-old
Are you sure you want to change the base?
Conversation
if we expose the drawScope functions, it will be come too much exposed. |
@hi-manshu I not sure if i understand you correctly what you mean with exposing a module. The issue is that for the wear os tile api there is no renderer system behind it. Please see my resent PR to demonstrate how to build a dynamic bar chart for wear os 3 tile api (yingding/horologist@85db914) Please see the following code example, // draw with DrawScope, and set the size
val runLive = canvasToImageResource(Size(160f, 100f), density) {
/* DrawScope extension functions */
gradientShadeBarChart(
state = state,
gradientBeginColor = BarChartHelper.gradientBeginColor,
gradientEndColor = BarChartHelper.gradientEndColor
)
} If it will be possible to create a I would be love to discuss more in details with you in this matter. |
Please refer to the ADS talk regarding this matter that Wear os Tile api has no render system and why DrawScope extension api are necessary https://youtu.be/w3KvfvgUIds?t=1033 Update: I think actually it would be a great idea to capsule the |
Hey buddy, |
Thank you so much, and I am really happy to have your support on this matter. |
@hi-manshu Kindly asking if you have an update on this issue. I would love to contribute and keep this moving forward. |
Hey @yingding |
Thanks for the great work to make this fantastic charty library.
It would be really great if the charty can refactor all the charts composable function into useful
DrawScope
function.This will be a fantastic feature to make dynamic graphs for
Wear OS 3 by google Material Tiles
with the horologist lib (https://github.com/google/horologist).The most open source compose chart libs are strictly depends on
Canvas composable
, ifCharty
can ease this dependency. It can become a valuable compose chart lib to make dynamic Tile charts for millions of potential Wear OS Material Tiles apps.