Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 17    Views: 152

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
03/19/14 07:29 PM (10 years ago)

New Plugin in market: Pie Chart

The Pie Chart plugin allows you to display data in a pie-chart form in your app. The pie chart is animated as it fills itself in on screen load (for iOS), as well as when users click on a section (both iOS and Android). Clicking on a section (or pie piece) also displays additional information about that section, such as the title, value, and a description.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/19/14 08:10 PM (10 years ago)
Chris, Looks cool! If a pie chart had a set number of Section Child Items that were constant, are we able to change the sectionValue via code or always use the JSON/Control Panel? Can you also post a link or pic in the plugin description of what settings are available for the circular chart (your middle pic)? Just working on a summary info screen that has numeric values, and this looks like a much nicer way to present the info. -------------------------------- Also sent you a PM on another item.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/19/14 08:24 PM (10 years ago)
You can configure the number of pie sections, their value, and description via the control panel. You add sections as child items. The circular chart (middle screenshot), is how the plugin looks on Android. It's filled in on iOS.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/19/14 08:35 PM (10 years ago)
Thanks! Just grabbed it from the plugin market and will try it tomorrow night :)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/19/14 08:36 PM (10 years ago)
Thanks! Be sure to leave a review if you like it :)
 
Cakebit
Code is Art
Profile
Posts: 501
Reg: Dec 15, 2010
In your local b...
16,510
like
03/19/14 09:17 PM (10 years ago)
It's so GREAT to have a plugin for both iOS and Android! - Great work! :D
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
03/20/14 01:45 AM (10 years ago)
Sold! Sold!! Sold!!! Thanks Chris for making for Android now also, when you make Android plugins you are actually encouraging and inspiring me to develop more apps, looking forward to the Android versions of other plugins by you in BT market... Cheers!
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/20/14 04:07 AM (10 years ago)
Hi Chris, Once more, you developed a beautiful and useful plugin! Excellent idea to create an Android version too, congratulations! I can't give you a feedback for Android, but I've tested the plugin on iOS7, BT core 3.0 self-hosted and it works perfectly. There are only 3 little issues... and 2 wishes! 1. Color settings are not functional (the pie always displays random colors). 2. In the XIB files, text view behavior settings shouldn't be set to 'editable' and 'selectable' (if you tap now under the pie, the keyboard is displayed and the text area is editable). 3. Missing space after the colon in CR_pieChart.m, line 304: self.descriptionText.text = [NSString stringWithFormat:@"%@: %@ (%.2f%%)\n%@",titleText,myValue,sectionPercentage,descText]; And now, a first wish: a CP setting to choose between 3 display modes on the pie. [value] (plain figure, as it is now) [value%] (figure with %) [title] (instead of value) BTW, 2 more display modes could be useful too: [title \n value] and [title \n value%] (both on 2 lines) And now... wish to know my second wish? A new setting in the CP to display a default text under the pie (i.e. some caption). This default text would be displayed only when you haven't tapped on a slice of the pie, in the same space as the pie slice descriptions. And then... this will definitely be a 5-star plugin! Cheers Jack
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/20/14 04:49 AM (10 years ago)
I really like the opening animation for Pie chart, and the way you can explode the sections! Testing: Sent you a PM with some added details regarding CP color setting- mentioned by fusion above. Agree that the idea for the default text that is displayed prior to tapping a section would be cool. (Would also be a way for us to tell the user that they can tap the sections.) Question: How do you select a different chart style? (similar to the second image in the Plugin description)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/20/14 06:43 AM (10 years ago)
Thanks for the feedback all. Will get to these in the next version. A note about the different styles of pie charts: The two styles seen in the screenshots are the difference between iOS and Android. iOS is filled in and Android is open. No way to switch that at this time.
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/20/14 07:11 AM (10 years ago)
Thanks to YOU, Chris!
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
03/20/14 08:03 AM (10 years ago)
Very nice. I've seen that control before and thought about tinkering with it for a project. The Android version looks interesting! Awesome work!
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/20/14 06:06 PM (10 years ago)
Chris has really set this up so it is easy to modify! Add the default pie chart description text: fusionsch- here is where to add (around line 67 in CR_pieChart.m) the text you were looking to add when screen initially displays prior to a pie section being selected: descriptionText.text = @"The chart above shows the percentage of each category. Tap on any section to display the category name, value and percentage."; // replaced default @"" blank NEW EDIT: Started implementing TabBar, and there was a special case where if I was looking at a PieChart, and had exploded a segment - then pressed "Home" tab and then returned via a Tab descriptionText was not synched correctly. Adding the following code (with your own text) will solve that. Whenever Chris adds to Control Panel, this should be changed to pull from there. -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self loadData]; //added for case when returning via TabBar descriptionText.text = @"The chart above shows the percentage of each category. \n\n Tap on any section to display the category name, value and percentage."; } PS note that you can use "\n " to force line break.
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/21/14 01:18 AM (10 years ago)
Thanks a lot, NCBuzz, it's a good workaround... until Chris upgrades the plugin to set this in the CP! If you just need the same default caption in all the pies it's ok, but being able to set a different caption for every chart will bring more versatility!
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/28/14 06:15 PM (10 years ago)
Want to add a five star review- but would like to see Control Panel fixes. Don't need any enhancements. But seems like CP issues would be quick to fix. ready to help test as needed...
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/29/14 11:54 AM (10 years ago)
Just updated the plugin
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/29/14 05:59 PM (10 years ago)
Awesome! Under a tornado warning here so all computers unplugged for now. Will grab it in the morning. First time my weather app made my phone vibrate like crazy and prompted to take shelter now. What's up with that. This is not suppose to be Kansas ;)
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/30/14 02:28 PM (10 years ago)
Turns out no tornado near us last night, but I am not complaining ;) Chris- Great job on the update- Nice addition getting the Pie Chart Properties expanded. Worked great to have two different descriptions and Label Display modes for my first two charts. There is a bug with each of the Label display modes that have a second line. The \n is not forcing line break and only first line is displayed. (IOS 7- iPhone 5C) Here are the two lines if Chris or someone else has the fix: Title with Value underneath: textForSlice = [NSString stringWithFormat:@"%@\n%.1f", titleText, value]; Title with Percentage underneath: textForSlice = [NSString stringWithFormat:@"%@\n%.1f%%", titleText, percentage]; Thanks again!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.