Android connection library with various graphs and charts (Currently only supports line chart, more types will be added soon)
taken down
repositories {
mavenCentral()
}
dependencies {
implementation 'com.github.madrapps:plot:0.1.1'
}
Properties
- Full customization of the different parts of the graph (such as the dot, line between the dots, emphasis in the selection, the values in the x-axis and the y-axis, etc …)
- Supports scrolling, zooming and touch drag
practice
Just add the LineGraph
To connect and transfer it a LinePlot
With all your configuration and customization. Please take a look at taste App to see the various customizations available. Almost every aspect of the graph is customizable. You can even bypass the default drawing applications and can draw a Rectangle
instead of Circle
, and so’. The code below shows the orange graph you see in the screenshots above.
@Composable
fun SampleLineGraph(lines: List<List<DataPoint>>) {
LineGraph(
plot = LinePlot(
listOf(
LinePlot.Line(
lines[0],
LinePlot.Connection(color = Red300),
LinePlot.Intersection(color = Red500),
LinePlot.Highlight(color = Yellow700),
)
),
grid = LinePlot.Grid(Red100, steps = 4),
),
modifier = Modifier.fillMaxWidth().height(200.dp),
onSelection = { xLine, points ->
// Do whatever you want here
}
)
}
license
plot By From drapes It is licensed under the Apache 2.0 License.
.