What can I use to implement a doughnut chart in iOS? - 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.

Related

Highchart fill area only between two series

Here is chart http://jsfiddle.net/erzLp3n9/2/
I need to remove color as this image is seems
this image
I have two different series.
I do not want to use area-stacked and arearange because that two different series is dynamic.
I had try by this http://jsfiddle.net/erzLp3n9/3/ but not working
By using negativeFillColor you can color the area if it is negative, which seems to be the problem with your second example.
See this fiddle.
Where I set plotOptions.area.negativeFillColor.
If you are wondering why they don't look like the same color, it is because the top one is 75% opacity, see Highcharts API.
Could you explain exactly why you do not want to use stacking? This option along with setting color of the second series to transparent gives desired effect.
API Reference:
http://api.highcharts.com/highcharts/plotOptions.series.stacking
Example:
http://jsfiddle.net/xhx34mvg/

Highcharts stacked bar graph as timeline

Is there a way to make the Highcharts stacked bar graph work like a timeline? What I'd like to achieve is demonstrated in this Google Timeline Chart example.
Of key importance is that values can be repeated on the same bar. I haven't been able to figure this out, and currently suspect I may need to fall back to the Renderer and draw this chart manually, or switch to Google Charts, both of which I'd prefer to avoid. Thanks for any thoughts!
Yes, it is possible. This is called a gantt chart. That link has various examples. Some dont work. In that case update the jsFiddle's jquery and change the highcharts.js inclusion url.

How to make color bar above navigator in Highstock?

I have chart showing time data. I have two points back in time which I need to "mark" in the chart.
I currently indicate these two by plotlines, but would like to show bar, with let's say green and blue bars showing the timespans (for example -13days from now with blue and -90days -> -13days with red).
I would use plotBands, but I can't specify their height and do not want to have them all over the chart.
Is there some way? I saw something about translating pixels and drawing rectangle, but wasn't able to make it work. Also - I zoom a lot in this chart.
You can use Renderer and add custom shape. In other cases, please attach mockup of your goal.
http://api.highcharts.com/highstock#Renderer

Google charts: is it possible to display tooltips when hovering areas in stacked area chart?

I have a stacked area chart using google charts. An example is here: https://code.google.com/apis/ajax/playground/?type=visualization#area_chart
The problem is, when I hover the cursor over an area, no tooltip is displayed. I need to hover the boundary of two neighboring areas to display the tooltip.
Is it possible to display tooltips when hovering areas? If not, do you know of some workaround?
You can use a SteppedAreaChart for this. Set isStacked to true, and by default the tooltips will be shown on hovering over an area.
No, you can't spawn the tooltips by hovering over the area. There is no way easy way to work around this, as the Visualization API does not trigger mouse events on the areas.
If you want to put the effort into this, you can create custom mouse event handlers on the chart's SVG/VML code. It might be possible to extrapolate which area the mouse is in, and given that, you can extrapolate the x-axis position from the mouse coordinates using the ChartLayoutInterface, and spawn a custom tooltip based on that information. Be aware that any solution involving the chart's SVG/VML code could break at any time, as the internal structure of the charts is not guaranteed to be stable from version to version.

timeline chart with events

For a rails web application I need a timeline with on the top (stacked) bar charts and on the bottom single events that should be recognizably different using e.g. forms (squares, rhombus, circles) and colors.
It's also important that I get some kind of picture back in order to reuse it to build a pdf.
At the moment I do the bar chart part with google charts, but I can't find a way to do the events. Those could also be on a separate chart that I then align in html or the pdf.
have you ever try the highcharts.
Here is an example of time series with events made with amCharts: http://www.amcharts.com/stock-chart/stock-events/
You can have any number of graphs stacked on each other, if this is what you want to do.
Disclaimer: I am the author of amCharts.

Resources