Giter Site home page Giter Site logo

charts's Introduction

Compose Charts

This is a library that Draws and animates charts using Android Jetpack Compose library.

Implementation:

latest_release = Release

build.gradle (app)

dependecies {
    implementation "com.github.tehras:charts:$latest_release"
}

settings.gradle

repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io'}
}

How it looks:

How to use Pie Chart:

@Composable
fun MyChartParent() {
    PieChart(
        pieChartData = PieChartData(listOf(Slice(...), Slice(...),....)),
    // Optional properties.
    modifier = Modifier.fillMaxSize(),
    animation = simpleChartAnimation(),
    sliceDrawer = SimpleSliceDrawer()
    )
}

How to use Bar Chart:

@Composable
fun MyBarChartParent() {
    fun BarChart(
        barChartData = BarChartData(bars = listOf(Bar(label = "Bar Label", value = 100f, color = Color.Red)),
            // Optional properties.
            modifier = Modifier.fillMaxSize(),
            animation = simpleChartAnimation(),
            barDrawer = SimpleBarDrawer(),
            xAxisDrawer = SimpleXAxisDrawer(),
            yAxisDrawer = SimpleYAxisDrawer(),
            labelDrawer = SimpleValueDrawer()
        )
}

How to use Line Chart:

@Composable
fun MyLineChartParent() {
    LineChart(
        linesChartData = listOf(LineChartData(points = listOf(LineChartData.Point(1f,"Label 1"), ...))),
    // Optional properties.
    modifier = Modifier.fillMaxSize(),
    animation = simpleChartAnimation(),
    pointDrawer = FilledCircularPointDrawer(),
    lineDrawer = SolidLineDrawer(),
    xAxisDrawer = SimpleXAxisDrawer(),
    yAxisDrawer = SimpleYAxisDrawer(),
    horizontalOffset = 5f,
    labels = listOf("label 1" ...)
    )
}

License

Copyright 2020 Taras Koshkin.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

charts's People

Contributors

cmmr2 avatar dkoshkin avatar gabegiro avatar isekaiweb avatar kikju avatar noahjutz avatar pranavmaganti avatar ravi-kumar7 avatar tehras avatar yashovardhan99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

charts's Issues

Bar chart animation starts from 0 when bar.value is updated

I have a bar chart with a bar set with bar.value = 100. Then when I update this value to 150 the following happens:

From 100 it jumps to 0 and then animates back to 150.

I'm looking for a way so that instead of jumping to 0 and then animating to 150 it animates from 100 to the next new value which in this case is 150.

Is there a way to do this?

Unable to integrate this library in my Compose Desktop project

Hello,

I am looking for a library to display graphics in my Compose Desktop application. I came across yours, so I tried to integrate it as shown here.

But when I run the gradle runDistributable task, I get this error:

Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find com.github.tehras:charts:Tag.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/github/tehras/charts/Tag/charts-Tag.pom
       - https://maven.pkg.jetbrains.space/public/p/compose/dev/com/github/tehras/charts/Tag/charts-Tag.pom
       - https://jitpack.io/com/github/tehras/charts/Tag/charts-Tag.pom
       - https://dl.google.com/dl/android/maven2/com/github/tehras/charts/Tag/charts-Tag.pom
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Here is my build.gradle.kts:

import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.5.21"
    id("org.jetbrains.compose") version "1.0.0-alpha4-build310"
}

group = "fr.genie23"
version = "1.0.0"

repositories {
    mavenCentral()
    maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
    maven("https://jitpack.io")
    google()
}

dependencies {
    implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.21")
    implementation(compose.desktop.currentOs)
    implementation("com.github.tehras:charts:Tag")
    implementation("org.apache.pdfbox:pdfbox:2.0.24")
    implementation("org.apache.pdfbox:fontbox:2.0.24")
    implementation("org.apache.pdfbox:jempbox:1.8.16")
    implementation("org.apache.pdfbox:xmpbox:2.0.24")
    implementation("org.apache.pdfbox:preflight:2.0.24")
    implementation("org.apache.pdfbox:pdfbox-tools:2.0.24")
    implementation("org.bouncycastle:bcprov-jdk15on:1.69")
    implementation("org.bouncycastle:bcmail-jdk15on:1.69")
    implementation("org.bouncycastle:bcpkix-jdk15on:1.69")
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "11"
}

tasks.withType<KotlinCompile>().configureEach {
    kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}

tasks.register<Copy>("copyRelease") {
    group = "compose desktop"
    description = "Copy release builded executable into out folder."
    duplicatesStrategy = DuplicatesStrategy.INCLUDE
    from(
        "build/compose/binaries/main/deb",
        "build/compose/binaries/main/dmg",
        "build/compose/binaries/main/exe",
        "build/compose/binaries/main/rpm"
    )
    into("out")
}

compose.desktop {
    application {
        mainClass = "MainKt"
        nativeDistributions {
            packageName = "Free CoManagement"
            description = "Logiciel de fusion de documents PDF"
            targetFormats(TargetFormat.Dmg, TargetFormat.Exe, TargetFormat.Deb, TargetFormat.Rpm)
            windows {
                iconFile.set(project.file("src/main/resources/icons/logo.64x64.ico"))
                dirChooser = true
                menuGroup = "Genie23.fr"
            }
            macOS {
                iconFile.set(project.file("src/main/resources/icons/logo.64x64.icns"))
            }
            linux {
                iconFile.set(project.file("src/main/resources/icons/logo.64x64.png"))
                menuGroup = "Genie23.fr"
            }
        }
    }
}

Drawing speed

The line chart takes some hundred milliseconds to draw.
Is it a deliberate "animation", or it really takes that amount of time to draw?

Support for theming?

Hi there, I think it'd be very helpful if the app could support theming, maybe just adding a default parameter to each chart type with the colors used inside?

Offset is unspecified

I am trying to add LineChart to my project and when I run it I get the error:

java.lang.IllegalStateException: Offset is unspecified
        at androidx.compose.ui.geometry.Offset.getX-impl(Offset.kt:67)
        at androidx.compose.ui.graphics.AndroidCanvas.drawCircle-9KIMszo(AndroidCanvas.android.kt:209)
        at com.github.tehras.charts.line.renderer.point.FilledCircularPointDrawer.drawPoint-0AR0LA0(FilledCircularPointDrawer.kt:30)
        at com.github.tehras.charts.line.LineChartKt$drawLine$1$1.invoke(LineChart.kt:175)
        at com.github.tehras.charts.line.LineChartKt$drawLine$1$1.invoke(LineChart.kt:170)
        at com.github.tehras.charts.line.LineChartUtils.withProgress(LineChartUtils.kt:104)
        at com.github.tehras.charts.line.LineChartKt.drawLine(LineChart.kt:170)
        at com.github.tehras.charts.line.LineChartKt.access$drawLine(LineChart.kt:1)
        at com.github.tehras.charts.line.LineChartKt$LineChart$6.invoke(LineChart.kt:124)
        at com.github.tehras.charts.line.LineChartKt$LineChart$6.invoke(LineChart.kt:71)
        at androidx.compose.ui.draw.DrawBackgroundModifier.draw(DrawModifier.kt:104)
        at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:381)
        at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
        at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
        at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
        at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
        at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
        at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
        at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
        at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
        at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
        at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
        at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
        at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
        at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
        at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
        at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
        at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2139)
        at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:130)
        at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:126)
        at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
        at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
        at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)
        at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
        at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
        at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
        at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:180)
        at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:298)
        at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1010)
        at android.view.View.draw(View.java:22707)
        at android.view.View.updateDisplayListIfDirty(View.java:21579)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4512)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4485)
        at android.view.View.updateDisplayListIfDirty(View.java:21535)
E/AndroidRuntime:     at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4512)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4485)
        at android.view.View.updateDisplayListIfDirty(View.java:21535)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4512)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4485)
        at android.view.View.updateDisplayListIfDirty(View.java:21535)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4512)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4485)
        at android.view.View.updateDisplayListIfDirty(View.java:21535)
        at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:534)
        at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:540)
        at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:616)
        at android.view.ViewRootImpl.draw(ViewRootImpl.java:4525)
        at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4245)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3374)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2179)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8787)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1037)
        at android.view.Choreographer.doCallbacks(Choreographer.java:845)
        at android.view.Choreographer.doFrame(Choreographer.java:780)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7842)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

I have used the code in the example and I still get the same error

Line chart is buggy

I found the line chart couldn't show point in the correct position, for example I revise the line chart data to

var lineChartData by mutableStateOf(
    LineChartData(
      points = listOf(
        Point(0.41163334f, "Label1"),
        Point(0.3429857f, "Label2"),
        Point(0.39720002f, "Label3"),
        Point(0.0842f, "Label4")
      ),
        lineDrawer = SolidLineDrawer(),
    )
  )

  var lineChartData2 by mutableStateOf(
    LineChartData(
      points = listOf(
        Point(0.003534f, "Label1"),
        Point(0.000123f, "Label2"),
        Point(0f, "Label3"),
        Point(0f, "Label4")
      ),
      lineDrawer = SolidLineDrawer(
        color = Color(0xFF00FF00)
      )
    )
  )

Here is the chart
image

Offset is unspecified exception

java.lang.IllegalStateException: Offset is unspecified
at androidx.compose.ui.geometry.Offset.getX-impl(Offset.kt:67)
at com.github.tehras.charts.line.LineChartUtils$calculateLinePath$1$1$1.invoke(LineChartUtils.kt:127)
at com.github.tehras.charts.line.LineChartUtils$calculateLinePath$1$1$1.invoke(LineChartUtils.kt:114)
at com.github.tehras.charts.line.LineChartUtils.withProgress(LineChartUtils.kt:103)
at com.github.tehras.charts.line.LineChartUtils.calculateLinePath(LineChartUtils.kt:114)
at com.github.tehras.charts.line.LineChartKt.drawLine(LineChart.kt:152)
at com.github.tehras.charts.line.LineChartKt.access$drawLine(LineChart.kt:1)
at com.github.tehras.charts.line.LineChartKt$LineChart$6.invoke(LineChart.kt:124)
at com.github.tehras.charts.line.LineChartKt$LineChart$6.invoke(LineChart.kt:71)
at androidx.compose.ui.draw.DrawBackgroundModifier.draw(DrawModifier.kt:104)
at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:381)
at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:840)
at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2139)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:130)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$observeReads$1$1.invoke(SnapshotStateObserver.kt:126)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:126)

Publish to Maven Central

Would be nice if this library was published to maven central which is more reliable and easier to consume than jitpack.

java.lang.NoSuchFieldError: No field Fill of type Landroidx/compose/ui/graphics/PaintingStyle

App compiles, but crashes when tries to show the LineChart. I updated Compose version to 1.0.4, and still get it.

java.lang.NoSuchFieldError: No field Stroke of type Landroidx/compose/ui/graphics/PaintingStyle; in class Landroidx/compose/ui/graphics/PaintingStyle; or its superclasses (declaration of 'androidx.compose.ui.graphics.PaintingStyle' appears in /data/app/~~1IClg3K24qqTN_iqrjdXRg==/es.jnsoft.whatweath-pLHYJOTf4GaonKm_ukZsTg==/base.apk)
at com.github.tehras.charts.line.renderer.line.SolidLineDrawer.(SolidLineDrawer.kt:14)
at com.github.tehras.charts.line.renderer.line.SolidLineDrawer.(Unknown Source:0)
at com.github.tehras.charts.line.renderer.line.SolidLineDrawer.(SolidLineDrawer.kt:8)

Edited:

I meant, my project was using Compose 1.0.1, and had the same issue.

Crash in emulator

Hello good day, when I implement the library I have the next crash in android emulators
Captura de pantalla 2024-04-24 182310

I have the following implementation
LineChart( linesChartData = listOf( LineChartData( points = homeModel?.report ?: listOf(), lineDrawer = SolidLineDrawer(), ) ), modifier = Modifier .fillMaxWidth() .height(250.dp) .padding(start = 54.dp, end = 16.dp), animation = simpleChartAnimation(), pointDrawer = FilledCircularPointDrawer(), horizontalOffset = 5f, )

Not able to add this library to project

I have been trying to add this library to my project and getting below error at the time of syncing the library. My project's Compose version is 1.0.0 and tehra's charts version used in my project is alpha-0.12.0

org.gradle.internal.resolve.ModuleVersionNotFoundException: Cannot resolve external dependency org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.10 because no repositories are defined.

LineChart values column doesn't show exact values

Hi there, thank you for the work in this lib, I've been using it for a bit and I noticed that the chart doesn't show the exact values for the points, at least with the ranges I'm using:

I created a LineChart with default params as an example with 2 points: Data0 - 5500 and Data1 - 6000

image

As you can see the leyend on the left shows a range between 5400 and 6100, which is fine, but then for some reason, the values are unrounded.

I'm not sure how's done at the moment, but it might need a bit of tweaking. I didn't have time to look into the source code, but if that would help please let me know where I can find the calculation for that so I might open a PR at some moment.

labelValueFormatter

Been desperately trying to figure out how to use the labelValueFormatter for the SimpleYAxisDrawer, but I just can't seem to figure out how to use it. I have a value that is in seconds and I need to convert it to a string that's something like "1h 30m 23s", but there are no examples, samples, or documentation that I can find on how to use the label formatter. Could you please either post up an example here, or add it to the BarChart sample. I really need this feature. Thank you

Filled line charts

Just an idea. I was trying to make my own charts in compose and took some inspiration from this library.
I actually implemented a Line chart with a custom fill color/gradient. Is that something you have planned? Or I can try working on this with your library.
This is how my chart looks (custom gradient fill with a dashed line):-
Screenshot from 2021-03-16 01-10-53

Though note that I am not allowing an x offset (only y offset within the lines) in my chart. So I am not sure how to handle the fill with an x offset (as you have in your example).

java.lang.NoSuchMethodError: No interface method startRestartGroup(ILjava/lang/String;)Landroidx/compose/runtime/Composer; in class Landroidx/compose/runtime/Composer;

I am having this error when I want to display a Bar Chart. Here it is my code using this repository:

@Composable fun MyBarChartParent() { BarChart( barChartData = BarChartData( bars = listOf(BarChartData.Bar(label = "Bar Label", value = 100f, color = Color.Red)) ), // Optional properties. modifier = Modifier.fillMaxSize(), animation = simpleChartAnimation(), barDrawer = SimpleBarDrawer() ) }

I have just used the sample BarChart code of the ReadME file

Multiplatform?

It would be nice to support Compose Multiplatform so this library can be used in Compose Web (wasm) and Desktop.

Any plans to do this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.