The graph I am trying to create is a line graph with six separate functions, all of which need to be easily shown and hidden from the graph and the legend. It also needs to use dual Y-axis'. The reason for the dual axis is that 3 of the functions have a very small range of Y-values, and the other 3 functions have a very large range of Y-values.
I tried to replicate an example in excel:
Above shows how my graph is currently set up. The values of the pink line range from [-300,300], while the values of the blue line range from [-50,50].
I would like the graph to be drawn like it is shown below:
I am currently using the GraphView library, but cannot find any support for dual Y-axis.
AChartEngine is a good charting Library. http://code.google.com/p/achartengine/
I am pretty sure it can do this.
Related
I want to implement single and multiple highlight line sliders in line chart. I am able to get only single highlight line slider with MPAndroidChart (https://github.com/PhilJay/MPAndroidChart) library. But I also need two highlight line sliders to allow the user to select range of values(min and max values) on the chart. Please refer the below image for more information:
Can we achieve the above requirement with any library or we need to draw a custom view?
Any help or guidance will be well appreciated.
In terms of shinobicharts, while the Crosshair could be easily customised to act like one of sliders, in order to have the two sliders you'd probably want to make use of the Annotations feature.
You can create Annotations with custom Views and add them at any X, Y point (in data terms). You can also convert between data values and pixel values via the Axes. It is therefore possible to make the Annotation follow the user's finger as they drag across the screen.
The trickiest part would be placing the circle on the LineSeries at the right Y-value. As I mentioned above you can convert pixel values (e.g. from a user gesture) to data values so you could easily get the X value but the API would leave quite a bit of work up to you in order to get the correct Y value.
This kind of feature is something that is requested quite often and is certainly something we are looking at providing in the future but for now, while possible, it isn't available out-of-the-box.
Disclaimer: I work for shinobicontrols
Its been almost two days m struggling to use compound graph with following features:-
graph with stacked bar and line chart together.
Two y-axis (one at right and other at left) with differnt data set.
Tooltip that display current touched coordinates of graph.
I had tried following android graph libraries:-
MPAndroidchart
This library doesnt supports compound graphs. But i love this library, since rest features are up to the mark.(wish this would had supported Compond graphs.)
AndroidPlot
It does support Compound graph but no tooltip and multiple y-axis.
AchartEngine
Supports compound graphs. Look and feel is not that good. No tooltip support. Support Heap bar(stacked) but you cannot use this along with any other chart type in same graph.
So, is there any other library that can match my requirement ?
or
how could i implement this using libraries that i mentioned.
I'm fairly sure that HelloCharts can do all of this. The demo app shows a "Combo Line/Column Chart" to satisfy point 1 and a "Speed Chart" to satisfy requirement 2. Point 3 works in all their charts from what I can tell.
The only thing I'm not 100% sure about is if the ComboLineColumnChartView also supports two Y-axis like the LineChartView, but I don't see why not. Let me know if it works.
I reasrched a lot about compound graphs in MPAndroidChart library. By compound graph i mean having multiple types of graph series in single plot.
I tried other libraries too like androidplot , achartengine library..
Although they provide compound graphs but they dont provide that much flexibility (like adding marker view/toast) .
My Expectation
1. i want both stacked bar chart and line chart in single graph
2. I need 2 y-axis(one at right and other at left)
is this possible?
Stacked-BarCharts are supported (as of v3.0.0 also in combination with LineChart)
2 YAxis are supported (left and right)
I've been working with Androidplot library for generating line plots and be able to do zoom and pan, so I'm using a modified version of XYPlotZoomPan class.
My current chart is showing some values per day, in a range of dates, so if I'm showing 7 days the domain axis is readable but if I'm trying to show 30 days it turns into a mess.
My goal is to show 7 days and have the option of scrolling through the rest of the chart that is not shown.
The only function that handles boundaries is setDomainBoundaries, currently I've tried this:
setDomainBoundaries(min, max, BoundaryMode.FIXED);
But it lets me show values inside this range and I'm loosing the ability for panning through the rest of the days.
Does someone have an a idea how I can do that? Thanks.
You can create your own domain value format with myplot.setDomainValueFormat(Format f). From here you can create your own formatter.
Another option you can look at is setDomainStep, a good example of that can be found here
I'm using the AchartEngine libraries to make a pie chart app. But I want to display two dimensional data like this
I can get nice standard pie charts but I know how to do the second dimension. Can anyone please help? The guys on the achartengine-google-support group say it's possible but I was redirected here for tech questions.
Many Thanks
If you take a look at the Budget Pie chart demo it shows you how to highlight a section of your pie chart (https://code.google.com/p/achartengine/source/browse/trunk/achartengine/demo/org/achartengine/chartdemo/demo/chart/BudgetPieChart.java). Take a look at "Project 1" below to see how this looks.
However there is no way to change the radius like you want to in your screenshot above. If you want to achieve this the easiest way would be to extend PieChart and copy over the draw method. In the draw method where it renders highlighted sections (if (seriesRenderer.isHighlighted()) ...) use a different radius instead of translating to an offset.