Android stock chart - android

I want to build a stock chart, but do not know which library I should use.
Can any library build the dynamic chart to be the background of the view?Thank you.

It's worth checking out SciChart, which has a very powerful iOS & Android Stock Chart control.
It is a commercial component, however it is a very fast and powerful chart library which beats MPAndroidChart by a very clear margin in performance tests. Sorry MPAndroidChart!
You can now clone the Android Chart examples on Github and have a play around with the controls and see how we created the above example app!
Full disclosure - I am the tech lead on the SciChart project

You can use this lib-https://github.com/PhilJay/MPAndroidChart.I used it for one of my projects.
If the requirements seems to be simple enough you could also try to write your own graph.Its pretty simple to do it in android.

Related

Does Android Jetpack require the use of the Kotlin language?

I can't seem to find a clear answer to this in Google, and all the documentation and samples I've seen for Jetpack seem to refer to and use Kotlin.
But do you HAVE to use Kotlin in order to use Jetpack? Or can Jetpack be used with traditional Java programs?
I was looking at Kotlin but it adds almost a MB to your app size. And seeing as my entire app is only about 200KB currently, I don't think Kotlin is worth increasing the size of my app by 500%!
Jetpack is a collection of libraries plus guidance on how Google recommends building Android applications. These libraries all have Java APIs, so you don't need to move to Kotlin to use any of them. Both languages are still completely supported for Android development.
As for the APK size consideration, it's true that Kotlin will definitely increase it. It's hard to tell how much larger it'll be, but Proguard should strip out a lot of the standard library that you end up not using, so it could be much less than an entire MB. Here's an article that compared Java and Kotlin APK sizes of an essentially empty Hello world app that found the increase to be just 11 KBs, for example. So unless you're in a market where this is extremely important, you could probably get away with using Kotlin.
More importantly though, switching to Kotlin is more than just pulling in a library - it's a new language to learn, which means you have to put some effort into it, and it can change a lot about how you write your applications. You should look into the language more and see if you like what it offers.
You just get more syntactic sugar when you use kotlin instead of java, but they have same functionality and you can even use them hybird.
Also android Jetpack is great, it shouldn't be limited by language. Although android-sunflower - the official demonstrate app of Android Jetpack wrote in Kotlin, it can still implement by java. In order to support Android Jetpack, I translated all kotlin implementations to Java, and added [app-java] module as the Java version of android-sunflower app, please check out android-sunflower-java.
Quoting Android documentation
Jetpack is a collection of Android software components to make it easier for you to develop great Android apps. These components help you follow best practices, free you from writing boilerplate code, and simplify complex tasks, so you can focus on the code you care about.
Jetpack comprises the androidx.* package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and is updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components.
Nowhere in the docs you'll find something saying that using Kotlin is required for Jetpack development. Also, if you open Android Studio 3.2 (Currently beta 5), in the New Project Dialog, you'll see the option to add Kotlin support just like the previous version of Android Studio, so you'll be completely fine going with Java without checking this box.

Creating graph/chart in android which support react-native

For my project I need gantt chart which support both android and ios. I want to start it with Android (java), but I dont know the way to expose it to react-native, such that I can use the graph in react-native and I don't find any related article for this.
first thing is after creating DemoChart.jar library, how can I make it available to be used with react-native (npm install DemoChart) javascript code & do I have to use C++ (android NDK) to bridge react-native and android.
Looking for a gantt chart, which has yAxis which shows a medical condition and it will have a horizontal line against it which scaling over xAxis (Dates or timePeriod), means in certain period (say a month) how often the medical condition has appeared
If you don't absolutely need to use native code, there is a really powerful library of components called Victory that allows you to make all kinds of charts. They also have a nice documentation here. This is compatible with both Android and iOS.

Android charts: to use webview/JS or to go native

We are going to build a android library which will provide a API for developers to build applications which can embed certain charts easily (the charts would display specific contents particular to the API).
Since there are no charting libraries that are dominant in the market, what library would be ideal for this. Some of the chart types need to be developed for this that are currently not supported by any native libraries( like heatmaps). Keeping this in mind would you guys advice going in for a native lib or with webview embedded HTML/JS.
The problem with webview is that you cannot package assets(html/js) on a library project like resources. So its again a additional step for the developers using the library to copy the assets to the project.
Additional Info:
My API should allow the developer to easily embed a chart. Something like
<org.example.customPieChart
android:id="#+id=chart"
android:width="150dip"
android:height="150dip"
/>
And the API should take care of everything else. Only if the developer wants to change color, customize the stuff then possibly he will use the other parts of the API and do that.
I have used aChartEngine Library for the chart and its working fine. So I am suggesting you aChartEngine.

Drawing a plot using System.Drawing Only

In my application in Windows Phone, i have made a custom plotting library for some simple plotting of a graph. I did this, using System.Windows.Shapes. Now i run to some problems when i want to use this on other platforms (android, and iphone, using mono).
So i came to the conclusion that i may need to remake te library using System.Drawing only. Because that namespace is available on all three platforms, and (if i have googled correctly) contains some functionally in drawing stuff on ui's.
My Questions
Am i correct in the fact that drawing contains drawing functions.. If so, how do i make a multi point line or polyLine?
Are there any (allready available) libraries that do the same using the System.Drawing namespace only?
If there are any plotting libraries that are available for only Android an MonoTouch than that will do aswell, because i've allready got a graph drawing function on my windowsphone, This will be my last resort. Because i want to keep the code behind the platforms mostly the same.
What i found out:
After some time put in to searching for an answer for this, i gave op hope to find libraries that implement a graph functionality for all the three platforms. There just doesn't seem to be one. There are libraries available for Silverlight and Monotouch(IOS) but, the silverlight part is NOT compatible with windows phone.
I found out that the library system.drawing does not have full functionality in silverlight, so after some careful consideration I also stepped away from that idea. And Moved towards making my own library that implements some #if (SILVERLIGHT) or #if (MONOTOUCH) region functionality.
At this point i have made my own library for WindowsPhone being able to draw a decent plain and simple graph. I eventualy done this using the System.Windows.Shapes namespace. Today i will start making the same sort of lib for android. And after that i will do it for windowsphone, The library will be open source, and when finished i think i will release it somewhere.
As a sort of summary: "there was not a real answer to my question, so
i had to work around it. This work around made me make my own cross
platform library
".

Good free chart library for Android

I need some decent chart library for my app. It must be free to non or commercial use. I've tried Androidplot. It was easy to use but charts were kinda ugly, and project is pretty much dead as I've noticed. Also there are no pie charts which I also need.
I've read about AChartEngine. It is used in calculator++ application. Source codes are here:
source

Categories

Resources