how to change a point color, style or size in line chart using achartengine android - achartengine

I'm developing an app now with achartengine to draw a line chart. Now I have a problem with an effect that I hope to fix. The effect is, when users touch a point on the line chart the color or style of point can be changed to different color or style. But the other points should remain the same as before.
I was not able to find any function to set a point color or style on achartengine API document.
Can someone please point me to any documentation that can help me with my problem?

There isn't such API available. However, you could create a temporary series that would contain one single point (the selected one), add it only as long as you need it and when no longer needed, just remove it from the dataset.

Related

How to make a vertical range plot filled with color using CorePlot in iOS?

I need to show a graph in my iOS app something like
We have been using CorePlot for all the graphs and now I need to add a new kind as shown above. I found I could draw a graph like the above with CPTRangePlot. My problem is I can only draw a horizontal graph as shown below.
Is there any way to make it vertical? For a single curve we can easily do that by switching the value on X-axis and Y-axis. But for this kind of "range plot", I could not find a way to make it work for drawing the upper-bound and lower-bound lines and filling range with color can only be achieved on a normal horizontal graph. And yes, I can easily rotate the container view by 90 degrees, as I did in my testbed app. But I just cannot do this in our current app because this new added "range plot" graph is not the only one on the view. We have many other curves sharing the same plot space. So is there any hidden property or method to achieve the job? Thanks in advance!
I just added a fillDirection property to the range plot to enable this feature. You'll need to use the latest code from the release-2.3 branch.

What TeeChart Tool can I use to Interactively select points from a FastLine Graph

While using Delphi Seattle 10 and Steema TeeChart Pro VCL FMX 2016.18, I am looking to Highlight a Selection of a Line Graph (multiple series) in the way that Zooming allows / makes a square around a highlighted selection of a Line Graph to indicate which part of it to zoom into (as long as the onmousedown action is in progress).
The purpose of this would be to allow the selection to remain highlighted while the mouse is no longer being clicked, to potentially "Delete" the highlighted Data points. All I need this for is to obtain the (X0 Y0 X1 Y1) values to possibly obtain the CalcPosPoint(X) and remove all the points inside. The data is currently obtained through a Record Struct (Memory Mapped) file, and it will there for be used to set/check for a property "deleted" to indicate on the next redraw of the graph which rows to completely ignore and which to continue printing.
I hope to be able to do this (select from 1 chart), and have it simultaneously draw on multiple graphs. I have tried to look for an example of this feature through the use of TSelectorTool (FMXTee). One of the pages I found referring to such a tool is Interactive data point selection as well as Multiple selections with Selector Tool
And my second question has to do with TeeCharts directly. Where would I find fmx240.bpl as TeeChart_Pro_Firemonkey_Demo.exe requires this file in order to run? I did manage to copy vcl240.bpl from "Embarcadero\Studio\18.0\bin" and put it into "Embarcadero\Studio\17.0\bin"
[Edited]
I have managed to capture / create a sample code (MVCE) from which I can now select a portion and create a square around a particular sample of graph lines.
The control graph right now is the bottom graph (Chart5). If anyone is interested in seeing the code, I have put up a pastebin sample.
PasteBin Sample Code
And a TeeCharts.tar.gz is accessible to anyone who wishes to see a sample of the code, as well as the data sample.
filetolink.com Source Files
I no longer feel the need for mathematical equation to differentiate the top graphs from the bottom (because the bottom axes are automatic where as the top are defined). I intend to only use the space which is adherent to the visible space, and do not intend to extend in either direction (left or right). That means at this point the size of the graph does not matter, because once I over populate the charts above, the position in the bottom graph would become irrelevant, and therefor I do not intend to use the bottom chart.
The next step is to save the positions of the boxes so that they can reappear when the graph is shift from left (past data) to the right (live data). And then uses the buttons above to make the appropriate action to the graphs.
I would like to know what way would be the most sufficient way to record the positions of the rectangles, so when the chart is shifted (via the ScrollBar1), the rectangles are moving with the direction of the scrollbar. But I'm sure I can achieve that.
I think I have found a solution. The red squares are only prevalent for the visual aspect, they can be drawn on, I don't need to do anything special with each chart, as I already know what the X0..Y1 parameters are, they are known from the initial chart. The problem h/e has to do with the initial chart. As long as the screens are all full, I can zoom in correctly w/ alignment with on all the charts (ZoomRect/Rectf(X0..Y1))
But what kind of equation would it take to adjust the charts that are not in the same zoom / max / min when the Chart5.Axes.Bottom.Automatic = True?
From there I just simply have to disable the immediate zoom feature, and allow buttons to become functional, to decide what the next course of action would be.

Indicate an important date on a chart with either a guideline (with text) or an opened callout

I'm looking for a way to indicate key dates on a highchart with a label eg Public Holiday. I can't find a way to add labeled guidelines or add an opened callout to a point? Help appreciated.
In Highstock you have series type called flags which is a opened callout (similar to Dygraphs annotation). This is probably the closest fit to the indicators you referred. See this JSFiddle example of how it looks. Note how this example uses the Highstock source file, but builds a Highcharts chart. See this documentation for official information.
In Highcharts you can highlight points, labels and value in a wide variety of ways. First of you can add data labels to your points, which renders text next to it. Secondly you can use plot lines to highlight certain values along an axis. See this JSFiddle example of how both of these options can be used.
Of course there are lots of ways to improve and build upon this out of the box functionality, but that is up to your specific demands and desires.

What can I use to implement a doughnut chart in iOS?

I'm looking for a free iOS component that allows me to draw a doughnut chart with text in the center. So far I've only used Code Plot, but that is a full pie chart.
I'm attaching an example of the requirement.
Any help will be much appreciated.
I suggest searching on cocoacontrols.com. They have lots of open source controls for iOS and Mac. I didn't se any specifically called "doughnut chart" but some of the pie charts controls might offer that option.
In fact, it seems that this one does include what you're calling a doughnut chart. It doesn't look like it has built-in support for a label in the middle, but it does create a ring-shaped chart like you want.
You could also always create a pie chart and then put a view on top of it that is transparent except for a white circle in the middle, and then put a label on top of that.
Getting a little more complex you could modify the CorePlot control and add a filled CAShapeLayer to it.
Another option is to create svg chart and use UIWebView to display it. With svg chart, you get much more flexibility with libraries like highcharts and d3js. Here's an example with donut chart:
http://vida.io/documents/Byh8tTakzB59oGa9f
You can embed the link or save svg and display in UIWebView. Saving svg works offline.

Highcharts stacked area filtering

I'm getting a bug in my stacked area implementation when a user filters to a specific line.
In the image linked below, you'll see we're tracking two trends. When I turn off the "Dialup" trend, the orange area should remain where it is. Instead, it moves up to fill the entire area. Likewise, if I were to turn off the orange "Broadband" trend, the green dialup area fills the entire area below it, rather than falling to the baseline as it should.
(stackoverflow will not allow me to post images yet.)
You can see the value in the tooltip remains accurate.
Could anyone provide some insight into what may be causing this? In case this may be a factor, the chart is generated based on a table of data using Highcharts.visualize().
I can see that you're using Highcharts 3.0.0. According to this, there was a bug in this version of Highcharts. If you upgrade Highcharts to the latest version, it should work as intended.

Resources