Giter VIP home page Giter VIP logo

linegraph's Introduction

##Line Chart

API

screenShot:

line chart android

Gradle :
  implementation 'io.github.farshidroohi:lineGraph:1.0.2'
       <io.github.farshidroohi.LineChart
           android:id="@+id/lineChart"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:orientation="vertical"
           app:chart_bg_color="#FF2B4A83"
           app:chart_line_color="#32FFFFFF"
           app:chart_line_size="4dp"
           app:chart_padding_bottom="20dp"
           app:chart_padding_left="20dp"
           app:chart_padding_right="20dp"
           app:chart_padding_top="20dp" />
class MainActivity : AppCompatActivity() {

   override fun onCreate(savedInstanceState: Bundle?) {
       super.onCreate(savedInstanceState)
       setContentView(R.layout.activity_main)

       val firstChartEntity = ChartEntity(Color.WHITE, graph1)
       val secondChartEntity = ChartEntity(Color.YELLOW, graph2)

       val list = ArrayList<ChartEntity>().apply {
           add(firstChartEntity)
           add(secondChartEntity)
       }

       val lineChart = findViewById<LineChart>(R.id.lineChart)
       lineChart.setLegend(legendArr)
       lineChart.setList(list)
   }

   private val firstChartEntity = floatArrayOf(113000f, 183000f, 188000f, 695000f, 324000f, 230000f, 188000f, 15000f, 126000f, 5000f, 33000f)
   private val secondChartEntity = floatArrayOf(0f, 245000f, 1011000f, 1000f, 0f, 0f, 47000f, 20000f, 12000f, 124400f, 160000f)
   private val legendArr = listOf("05/21", "05/22", "05/23", "05/24", "05/25", "05/26", "05/27", "05/28", "05/29", "05/30", "05/31")

}

Goal :
swipe chart line and show data chart tips

linegraph's People

Contributors

antoxa2584x avatar farshidroohi 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

Watchers

 avatar  avatar  avatar

linegraph's Issues

Cannot Add Left Axis Labels

Hi Farshid,

I am using your library for one of my collage project, Your chart is as same as i want, but I can't add the Left Axis Labels for chart,
can you please help me how i can achieve this feature...

Please Help Me , I will be glad.

Not able to customize the imported LineChart in Jetpack Compose

I am using your library in Jetpack Compose, but I am unable to customize the values of the chart using legend values. The problem I am facing is that it is imported like an image, nothing else I am able to customize. Can you guide me on what to do? Or is it a problem with Jetpack Compose? Fast reply will be appreciated.

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.