paulroehr / eazegraph Goto Github PK
View Code? Open in Web Editor NEWAn Android chart and graph library
License: Apache License 2.0
An Android chart and graph library
License: Apache License 2.0
How declare attrs of graph in style.xml?
I want decrare this attrs in style.xml and dynamically create charts with this attrs
app:egUseCubic="true"
app:egUseOverlapFill="true"
app:egCurveSmoothness="0.4"
app:egIndicatorColor="#FE6DA8"
app:egLegendHeight="40dp"
app:egShowStandardValue="true"
How to update PieChart's PieModel value on Resume?
I try to reloadView()
, clearChart()
, destroyDrawingCache()
before add again, but it does not work.
There used to be a BaseChart.OnUpdateListener in some previous version. Where can I find similar functionlaity now
When i touch barchart (not clicked. e.g, swipe), onclick event is fired
It's can be greate if bar charts can be clickable
When I make a new BarGraph
that has padding and labels at the top, the padding does not look at the height of the label and add the difference.
The README shows for the Line Chart app:egIndicatorColor
, which should be app:egIndicatorLineColor
:)
My build.gradle contains the following:
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/groups/public'
}
}
dependencies {
// Charting library
compile 'com.github.blackfizz:eazegraph:1.0.10-SNAPSHOT@aar'
}
Error:A problem occurred configuring project ':app'.> Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.github.blackfizz:eazegraph:1.0.10-SNAPSHOT.
Am using the pie chart in a view pager so the rotation can't work for me. Was wondering if I click click on a pie slice and the legend can rotate there. Thanks
How can I remove legendLabel and Arrow icon from Bottom of PIE chart ?
I don't want to have startup Animation in PIE chart , Is there anyway to disable it ?
LayoutInflater inf = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout ll = (LinearLayout) inf.inflate(R.layout.layout_pie_chart, null, false);
layout_pie_chart.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.eazegraph.lib.charts.PieChart xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pie_chart"
android:layout_width="match_parent"
android:layout_height="300dp"
android:padding="8dp"
app:egLegendTextSize="18sp"
app:egUsePieRotation="true"
app:egValueTextSize="36sp" />
</LinearLayout>
Error
Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class org.eazegraph.lib.charts.PieChart
Inflate in AsyncTask
The repository works great.
But on some of the android devices running Lollipop (4 out of 9 devices), the initial rendering of animation of PieChart isn't done in a proper manner.
The animation blinks while rendering.
For example I set barmodel value to 1561456.11, but I want to show to user as 156,145,6.11.
Provide String value in constructor, that will be shown to user.
Is there any way, or any easy way I can implement a way of specifying a minimum and maximum height for bars in a bar chart?
The data that I am rendering is always going to be between two values, but the app dynamically loads the data every second so when the first value is loaded it currently appears full height given there is no other data to compare to. The data is a temperature reading as well, so if it doesn't fluctuate a large amount, then the bars will continue to be full height until it spikes a lot.
What I want to do is have the height of the bar be relative to the min and max values I have rather than be adjusted according to all of the data. How could this be implemented?
Is there any chance to see this library at the Central repo, not only at the snapshots one?
Calling the clearChart() method on a BarChart object calls BaseBarChart::calculateBarPositions(0) which results in the mentioned exception
Also, please consider supporting BarCharts and StackedBarCharts without labels.
Are there any plans to add y-axis labels and a drawing grid to this excellent library? By grid I mean a bunch of horizontal lines that indicate the value of the bar/line at certain labeled points on the y-axis.
No resource identifier found for attribute 'egIndicatorLineColor' in package
when I add this attribute in layout xml
I got above error,how can I solve this issue,thanks
It would be nice to have a way to prevent the Legend object to be added to the charts. I need the pie chart without any legend but can't get rid of that triangle ;)
I've found some strange behaviour with the setUseOverlapFill(boolean)
method for the ValueLineChart
. If only one serie is added to the ValueLineSeries
it always fills the area under the graph, even when mUseOverlapFill
is set to false.
I don't know if this is intended behaviour, but it feels kind of strange. I believe it can be fixed in line 801 of the ValueLineChart
class by removing the seriesCount
check:
if (mUseOverlapFill || seriesCount == 1) {
path.lineTo(mGraphWidth, usableGraphHeight);
path.lineTo(0, usableGraphHeight);
path.lineTo(firstX, firstY);
}
Hi. Any ability to display barchart in Vertical mode?
[-------------------------------]
[------------------]
[------------------------------]
Instead of
_
I
I _
I I
I I
I I
I_ I_
I want to make bar in horizontal bar chart curved. Can you please help me.
HI Paul,
we are using your chart, but still have a problem to start a drawing from the middle without a 0 point.
I want to start a line from 1000 point not from 0 to 1000
how to do this? please help
e.g:
pieChart.setValueTextColor(Color.parseColor("#ffffff"));
pieChart.setLegendColor(Color.parseColor("#ffffff"));
They don't work. Even calling pieChart.update();
doesn't update the colours.
Calling these functions before pieChart.startAnimation();
also renders the functions unresponsive.
Hi!
If BarChart has all barModels with value 0 - 0 is not shown? Why bars have such behavior and where can I fix this?
thanks
http://cs624422.vk.me/v624422751/39ba4/iC84sir2viQ.jpg
Hey,
I'd like to display dynamically some big textes (20-30 Chars) in piecharts legend. At the moment I get only one line for legend and because of that some characters are occasionally unvisible.
I have tried 2 solutions:
p.s.Thanks for this beautiful library!
I am using the latest non-interactive version of EazeGraph, which I think is really simple and amazing. But I need some help on the following issues.
From the picture above, we can tell that the Y values are 0, 1, 3, 5, instead of 0, 2, 4, 6. And the highest point of the red curve is a little bit lower than expected(the actual value is 7.5).
Besides, when app:egUseCubic="true"
, this deviation becomes larger as the value of app:egCurveSmoothness
goes higher. Below is a graph whose app:egCurveSmoothness
is 0.4.
Here is a part of the XML layout file:
<org.eazegraph.lib.charts.ValueLineChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="200dp"
app:egUseCubic="true"
app:egCurveSmoothness="0.4"
app:egXAxisStroke="0.1dp" />
So is there anything I missed to do this right?
Thank you in advance.
When I am using eazegraph barchart inside horizontalScrollView than graph is not shown.My requirement is that I am using graph inside viewpager so will u solve this problme...
Provide .jar file or eclipse project to incldue as dependency
It should be an aoption to disable animation, or set custom animation when graph is loaded.
Hello Paul.
I'm using your chart.I have one question about LineChart.is it a possible to disable(remove) zooming action in LineChart?
thanks
A method to change the color of the bar?
I got some error like this:
res\drawable-hdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
res\drawable-hdpi\ic_launcher.png:0: Originally defined here.
res\drawable-mdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
res\drawable-mdpi\ic_launcher.png:0: Originally defined here.
res\drawable-xhdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
res\drawable-xhdpi\ic_launcher.png:0: Originally defined here.
res\drawable-xxhdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
res\drawable-xxhdpi\ic_launcher.png:0: Originally defined here.
Should you rename the 'ic_launcher'?
Hello,
how can I set X axis range. I want to set it fixed, now it is dynamic.
or how can i show graph only in specified location for example from 1 to 6 point. Because then, i can set 0 point to my min, and x point to my max and show graph from 1 to (x-1) point.
Best regards. Eliah.
My graph is crashing when i pinch zoom it without the property set in xml:
app:egShowValueIndicator="false"
and if i set it to true it suddenly stops crashing.
And i want to stop pinch zoom what is the xml or java property to stop that ? I have tried touchListener to null but it is not effecting the situation.
Hi,
Thanks for this library.
I am trying to do the multiple line charts in single graph view. I am adding different series to mCubicValueLineChart. But here IndicatorLine is not working. Please fix that issue.
I want it to be transparent and just show the lines of the ValueLineChart
Hello,
I add bars but the legends do not appear yet I use the appropriate constructor finally in my opinion.
`arChart mBarChart = (BarChart)dialog.getCustomView().findViewById(R.id.barchart);
mBarChart.addBar(new BarModel("Moudjames23", 2.3f, 0xFF123456));
`
Thank you in advance for your answers.
like title.
There is a problem with it.
I'm trying to use the setOnBarClickedListener(IOnBarClickedListener)
method to highlight a bar by changing its colour. However, the StackedBarChart
only redraws after moving the graph. Would it be possible to redraw the bar after the click without moving the graph?
org.eazegraph.lib.charts.ValueLineChart.findNearestPoint (ValueLineChart.java:1358)
org.eazegraph.lib.charts.ValueLineChart.onGraphOverlayTouchEvent (ValueLineChart.java:1341)
org.eazegraph.lib.charts.BaseChart$GraphOverlay.onTouchEvent (BaseChart.java:497)
Hey, first of all great work, loving the library. So the thing is right now, I can't find a way to set maximum value for Y axis. Is there any way i can achieve that?
Hey there,
I met a problem when I try to zoom out the chart. Seems I did not pass the touch event correctly.
How do I pass value to mFocusedPoint so that I can solve this error...the action was 2 fingers zooming out
java.lang.NullPointerException
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at org.eazegraph.lib.charts.ValueLineChart.calculateValueTextHeight(ValueLineChart.java:980)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at org.eazegraph.lib.charts.ValueLineChart.access$800(ValueLineChart.java:57)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at org.eazegraph.lib.charts.ValueLineChart$4.onScale(ValueLineChart.java:1050)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ScaleGestureDetector.onTouchEvent(ScaleGestureDetector.java:437)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at org.eazegraph.lib.charts.ValueLineChart.onGraphOverlayTouchEvent(ValueLineChart.java:1331)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at org.eazegraph.lib.charts.BaseChart$GraphOverlay.onTouchEvent(BaseChart.java:497)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.View.dispatchTouchEvent(View.java:7713)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2329)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1568)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.app.Activity.dispatchTouchEvent(Activity.java:2458)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:59)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:59)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2277)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.View.dispatchPointerEvent(View.java:7893)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3947)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3826)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3442)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3411)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3518)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3419)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3575)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3442)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3411)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3419)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3392)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5532)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5512)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5483)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5612)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
09-21 12:19:28.687 7458-7458/androidpath.ll.lesleepbc E/AndroidRuntime: at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
Method to change the x-axis
Is it possible to display only first and last value on X axis? and remove line above values in X axis
I've run into an unusual issue with the chart I'm rendering. I've got a standard bar chart which is updated by adding one new bar every second. What I've noticed however is that every time a bar is added, the entire chart appears to shift to the left ever so slightly, perhaps 1 px every 2 bar additions. In the long run, this results in the chart being invisible as it is pushed off the side of the screen.
I've tried debugging the code but I'm unable to determine where the issue lies but it is quite a problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.