├── .DS_Store
├── Icon-72.png
├── Icon.png
├── Icon@2x.png
├── MIMChartLib.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ ├── mac.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ ├── reebok.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
│ │ └── reeturaj.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
└── xcuserdata
│ ├── mac.xcuserdatad
│ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ └── xcschemes
│ │ ├── MIMChartLib.xcscheme
│ │ └── xcschememanagement.plist
│ ├── reebok.xcuserdatad
│ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ └── xcschemes
│ │ ├── MIMChartLib.xcscheme
│ │ └── xcschememanagement.plist
│ └── reeturaj.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints.xcbkptlist
│ └── xcschemes
│ ├── MIMChartLib.xcscheme
│ └── xcschememanagement.plist
├── MIMChartLib
├── .DS_Store
├── AppDelegate.h
├── AppDelegate.m
├── How to Use
│ ├── BarTestClass.h
│ ├── BarTestClass.m
│ ├── BarTestClass.xib
│ ├── ChartAnimation.h
│ ├── ChartAnimation.m
│ ├── ChartAnimation.xib
│ ├── DataManager.h
│ ├── DataManager.m
│ ├── DefaultDetailView.h
│ ├── DefaultDetailView.m
│ ├── DefaultDetailView.xib
│ ├── DefaultInfoBoxTestClass.h
│ ├── DefaultInfoBoxTestClass.m
│ ├── DefaultInfoBoxTestClass.xib
│ ├── DetailViewStyle2.h
│ ├── DetailViewStyle2.m
│ ├── DetailViewStyle2.xib
│ ├── DetailViewStyle3.h
│ ├── DetailViewStyle3.m
│ ├── DetailViewStyle3.xib
│ ├── GaugeGraphTestClass.h
│ ├── GaugeGraphTestClass.m
│ ├── GroupBarTestClass.h
│ ├── GroupBarTestClass.m
│ ├── GroupBarTestClass.xib
│ ├── InfoBoxStyle1TestClass.h
│ ├── InfoBoxStyle1TestClass.m
│ ├── InfoBoxStyle1TestClass.xib
│ ├── InfoBoxStyle2TestClass.h
│ ├── InfoBoxStyle2TestClass.m
│ ├── InfoBoxStyle2TestClass.xib
│ ├── ListBasicPieCharts.h
│ ├── ListBasicPieCharts.m
│ ├── ListBasicPieCharts.xib
│ ├── ListBevelPieCharts.h
│ ├── ListBevelPieCharts.m
│ ├── ListBevelPieCharts.xib
│ ├── ListBiTransPieChart.h
│ ├── ListBiTransPieChart.m
│ ├── ListBiTransPieChart.xib
│ ├── ListPaddedPieCharts.h
│ ├── ListPaddedPieCharts.m
│ ├── ListPaddedPieCharts.xib
│ ├── ListSectionedPieCharts.h
│ ├── ListSectionedPieCharts.m
│ ├── ListSectionedPieCharts.xib
│ ├── MultipleBarViews.h
│ ├── MultipleBarViews.m
│ ├── MultipleBarViews.xib
│ ├── RangeGraphTestClass.h
│ ├── RangeGraphTestClass.m
│ ├── RangeGraphTestClass.xib
│ ├── StackedBarTestClass.h
│ ├── StackedBarTestClass.m
│ ├── StackedBarTestClass.xib
│ ├── TestClassFragmented.h
│ ├── TestClassFragmented.m
│ ├── TestClassFragmented.xib
│ ├── TestLineClass.h
│ ├── TestLineClass.m
│ ├── TestLineClass.xib
│ ├── TestLineClass2.h
│ ├── TestLineClass2.m
│ ├── TestLineClass2.xib
│ ├── UserDefinedDetailView.h
│ ├── UserDefinedDetailView.m
│ ├── UserDefinedDetailView.xib
│ ├── WallTestClass.h
│ ├── WallTestClass.m
│ ├── WallTestClass.xib
│ ├── data3.csv
│ ├── data4.csv
│ ├── imageForPopUp
│ │ ├── bird1.jpg
│ │ ├── bird2.jpg
│ │ ├── bird3.jpg
│ │ ├── bird4.jpg
│ │ ├── dog1.jpg
│ │ ├── dog2.jpg
│ │ ├── dog3.jpg
│ │ ├── feline1.jpg
│ │ ├── feline2.jpg
│ │ ├── feline3.jpg
│ │ ├── ham1.jpg
│ │ ├── ham2.jpg
│ │ ├── ham3.jpg
│ │ ├── horse1.jpg
│ │ ├── horse2.jpg
│ │ ├── rabbit1.jpg
│ │ └── rabbit2.jpg
│ ├── pajarito1.png
│ ├── pajarito2.png
│ ├── pajarito3.png
│ ├── pajarito4.png
│ ├── pajarito5.png
│ ├── pajarito6.png
│ ├── pajarito7.png
│ └── trans_icon.png
├── Level2iPadController.h
├── Level2iPadController.m
├── Level2iPadController.xib
├── Lib Files
│ ├── .DS_Store
│ ├── Accessories
│ │ ├── Anchor.h
│ │ ├── Anchor.m
│ │ ├── AnchorDelegate.h
│ │ ├── AnchorInfo.h
│ │ ├── AnchorInfo.m
│ │ ├── Constant.h
│ │ ├── CustomBox.h
│ │ ├── CustomBox.m
│ │ ├── MIMFloatingView.h
│ │ ├── MIMFloatingView.m
│ │ ├── MIMMargin.h
│ │ ├── MIMMargin.m
│ │ ├── MIMMeter.h
│ │ ├── MIMMeter.m
│ │ ├── MIMProperties.h
│ │ ├── MIMProperties.m
│ │ ├── MIM_MathClass.h
│ │ ├── MIM_MathClass.m
│ │ ├── PageControl.h
│ │ ├── PageControl.m
│ │ ├── XAxisBand.h
│ │ ├── XAxisBand.m
│ │ ├── XAxisLabel.h
│ │ ├── XAxisLabel.m
│ │ ├── YAxisBand.h
│ │ └── YAxisBand.m
│ ├── Bar Chart
│ │ ├── .DS_Store
│ │ ├── BarGraphDelegate.h
│ │ ├── BarInfoBox.h
│ │ ├── BarInfoBox.m
│ │ ├── BarView.h
│ │ ├── BarView.m
│ │ ├── MIMBarGraph.h
│ │ └── MIMBarGraph.m
│ ├── ClusterGraph
│ │ ├── Cluster.h
│ │ ├── Cluster.m
│ │ ├── ClusterGraph.h
│ │ ├── ClusterGraph.m
│ │ └── ClusterGraphDelegate.h
│ ├── Colors
│ │ ├── MIMColor.h
│ │ ├── MIMColor.m
│ │ ├── MIMColorClass.h
│ │ └── MIMColorClass.m
│ ├── FragmentedPieChart
│ │ ├── DoughtNutFragmentTitle.h
│ │ ├── DoughtNutFragmentTitle.m
│ │ ├── FragmentedDoughNutDelegate.h
│ │ ├── MIMFragmentedDoughNut.h
│ │ └── MIMFragmentedDoughNut.m
│ ├── GaugeMeter
│ │ ├── GaugeGraph.h
│ │ └── GaugeGraph.m
│ ├── Images
│ │ ├── monotone_location_pin_marker.png
│ │ └── monotone_position_marker.png
│ ├── Line Graph
│ │ ├── LineGraphDelegate.h
│ │ ├── LineInfoBox.h
│ │ ├── LineInfoBox.m
│ │ ├── LineScrollView.h
│ │ ├── LineScrollView.m
│ │ ├── MIMLineGraph.h
│ │ ├── MIMLineGraph.m
│ │ ├── MultiLineLongGraph.h
│ │ ├── MultiLineLongGraph.m
│ │ ├── lines.png
│ │ └── lines1.png
│ ├── Pie Chart
│ │ ├── BasicPie.h
│ │ ├── BasicPie.m
│ │ ├── BasicPieChart.h
│ │ ├── BasicPieChart.m
│ │ ├── BasicPieChartSample.png
│ │ ├── BevelPieChart.h
│ │ ├── BevelPieChart.m
│ │ ├── BevelPieChart.png
│ │ ├── BiTransPieCHartSample.png
│ │ ├── BiTransPieChart.h
│ │ ├── BiTransPieChart.m
│ │ ├── DefaultInfoBox.h
│ │ ├── DefaultInfoBox.m
│ │ ├── DefaultPopOverForPieChart.h
│ │ ├── DefaultPopOverForPieChart.m
│ │ ├── DetailPopOverStyle2.h
│ │ ├── DetailPopOverStyle2.m
│ │ ├── InfoBoxStyle1.h
│ │ ├── InfoBoxStyle1.m
│ │ ├── InfoBoxStyle2.h
│ │ ├── InfoBoxStyle2.m
│ │ ├── LayeredPieChart.h
│ │ ├── LayeredPieChart.m
│ │ ├── LeftTriangleIcon.png
│ │ ├── LeftTriangleIconBlack.png
│ │ ├── MIMPieChart.h
│ │ ├── MIMPieChart.m
│ │ ├── MIMPieChartDelegate.h
│ │ ├── OthersPart1.png
│ │ ├── OthersPieChart.h
│ │ ├── OthersPieChart.m
│ │ ├── PaddedPieChart.h
│ │ ├── PaddedPieChart.m
│ │ ├── PermanentScroller.h
│ │ ├── PermanentScroller.m
│ │ ├── PieBubble.h
│ │ ├── PieBubble.m
│ │ ├── RightTriangleIcon.png
│ │ ├── RightTriangleIconBlack.png
│ │ ├── ScrollViewSubClass.h
│ │ ├── ScrollViewSubClass.m
│ │ ├── SectionedPieChart.h
│ │ ├── SectionedPieChart.m
│ │ ├── layeredpiechart.jpg
│ │ ├── otherspart2.png
│ │ ├── padded_pie_chart.png
│ │ ├── pie_pop_over_gradient.jpg
│ │ ├── sectioned_pie_chart.png
│ │ └── trophy.png
│ ├── Range Chart
│ │ ├── MIMLongRangeGraph.h
│ │ ├── MIMLongRangeGraph.m
│ │ ├── MIMRangeGraph.h
│ │ ├── MIMRangeGraph.m
│ │ └── RangeGraphDelegate.h
│ └── Wall Graph
│ │ ├── MIMWallGraph.h
│ │ ├── MIMWallGraph.m
│ │ ├── MultiWallLongGraph.h
│ │ ├── MultiWallLongGraph.m
│ │ └── WallGraphDelegate.h
├── MIMChartLib-Info.plist
├── MIMChartLib-Prefix.pch
├── MainController.h
├── MainController.m
├── MainController.xib
├── en.lproj
│ └── InfoPlist.strings
└── main.m
└── README
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/.DS_Store
--------------------------------------------------------------------------------
/Icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/Icon-72.png
--------------------------------------------------------------------------------
/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/Icon.png
--------------------------------------------------------------------------------
/Icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/Icon@2x.png
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/reebok.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/reebok.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/reebok.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/reeturaj.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/reeturaj.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/project.xcworkspace/xcuserdata/reeturaj.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
18 |
19 |
31 |
32 |
44 |
45 |
57 |
58 |
70 |
71 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/MIMChartLib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
38 |
39 |
40 |
41 |
50 |
51 |
57 |
58 |
59 |
60 |
61 |
62 |
68 |
69 |
75 |
76 |
77 |
78 |
80 |
81 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MIMChartLib.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 235C23F31548BBAD00919081
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/reebok.xcuserdatad/xcschemes/MIMChartLib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
70 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/reebok.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MIMChartLib.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 235C23F31548BBAD00919081
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/reeturaj.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
19 |
20 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/reeturaj.xcuserdatad/xcschemes/MIMChartLib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
14 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
31 |
32 |
38 |
39 |
40 |
41 |
50 |
51 |
57 |
58 |
59 |
60 |
61 |
62 |
68 |
69 |
75 |
76 |
77 |
78 |
80 |
81 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/MIMChartLib.xcodeproj/xcuserdata/reeturaj.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MIMChartLib.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 235C23F31548BBAD00919081
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/MIMChartLib/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/.DS_Store
--------------------------------------------------------------------------------
/MIMChartLib/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | // AppDelegate.h
21 | // MIMChartLib
22 | //
23 | // Created by Reetu Raj on 4/25/12.
24 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
25 | //
26 |
27 | #import
28 |
29 | @interface AppDelegate : UIResponder
30 | {
31 | UINavigationController *navigationController;
32 | }
33 | @property (strong, nonatomic) UIWindow *window;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/MIMChartLib/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | //
21 | // AppDelegate.m
22 | // MIMChartLib
23 | //
24 | // Created by Reetu Raj on 4/25/12.
25 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
26 | //
27 |
28 | #import "AppDelegate.h"
29 | #import "MainController.h"
30 |
31 | @implementation AppDelegate
32 |
33 | @synthesize window = _window;
34 |
35 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
36 | {
37 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
38 |
39 |
40 | MainController *rootController=[[MainController alloc]initWithNibName:@"MainController" bundle:nil];
41 | navigationController=[[UINavigationController alloc]initWithRootViewController:rootController];
42 | [self.window addSubview:navigationController.view];
43 |
44 |
45 | // Override point for customization after application launch.
46 | self.window.backgroundColor = [UIColor whiteColor];
47 | [self.window makeKeyAndVisible];
48 | return YES;
49 | }
50 |
51 | - (void)applicationWillResignActive:(UIApplication *)application
52 | {
53 | /*
54 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
55 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
56 | */
57 | }
58 |
59 | - (void)applicationDidEnterBackground:(UIApplication *)application
60 | {
61 | /*
62 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
63 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
64 | */
65 | }
66 |
67 | - (void)applicationWillEnterForeground:(UIApplication *)application
68 | {
69 | /*
70 | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
71 | */
72 | }
73 |
74 | - (void)applicationDidBecomeActive:(UIApplication *)application
75 | {
76 | /*
77 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
78 | */
79 | }
80 |
81 | - (void)applicationWillTerminate:(UIApplication *)application
82 | {
83 | /*
84 | Called when the application is about to terminate.
85 | Save data if appropriate.
86 | See also applicationDidEnterBackground:.
87 | */
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/BarTestClass.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | // BarTestClass.h
21 | // MIMChartLib
22 | //
23 | // Created by Reetu Raj on 15/08/11.
24 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
25 | //
26 |
27 | #import
28 | #import "MIMBarGraph.h"
29 | #import "MIMColor.h"
30 |
31 | @interface BarTestClass : UIViewController
32 | {
33 |
34 | IBOutlet UITableView *myTableView;
35 | MIMBarGraph *myBarChart;
36 |
37 |
38 | NSArray *yValuesArray;
39 | NSArray *xTitlesArray;
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/ChartAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // ChartAnimation.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/29/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 | #import "MIMColorClass.h"
12 | #import "PageControl.h"
13 |
14 | @interface ChartAnimation : UIViewController
15 | {
16 | IBOutlet UITableView *myTableView;
17 |
18 | BasicPieChart *myPieChart;
19 | }
20 | @end
21 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/DataManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // DataManager.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 12/15/12.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface DataManager : NSObject
12 | {
13 | NSArray *yValuesArray;
14 | NSArray *xTitlesArray;
15 | NSArray *xValuesArray;
16 |
17 | }
18 | @property(nonatomic,retain)NSArray *yValuesArray;
19 | @property(nonatomic,retain)NSArray *xTitlesArray;
20 | @property(nonatomic,retain)NSArray *xValuesArray;
21 |
22 | //Wall
23 | -(void)createSingleWallPositiveData;
24 | -(void)createThreeWallPositiveData;
25 | -(void)createSingleWallNegativeData;
26 | -(void)createDoubleWallNegativeData;
27 | -(void)createThreeWallNegativeData;
28 | -(void)createDataForLongSingleWall:(NSMutableArray *)xDataArrayFromCSV :(NSMutableArray *)dataArrayFromCSV;
29 | -(void)createDataForLongMultipleWall:(NSMutableArray *)xDataArrayFromCSV :(NSMutableArray *)dataArrayFromCSV;
30 | -(void)createDataForLongNegativeWall:(NSMutableArray *)xDataArrayFromCSV :(NSMutableArray *)dataArrayFromCSV;
31 | @end
32 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/DefaultDetailView.h:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultDetailView.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 |
12 |
13 |
14 | @interface DefaultDetailView : UIViewController
15 | {
16 |
17 | IBOutlet UITableView *myTableView;
18 | BasicPieChart *myPieChart;
19 |
20 |
21 | }
22 |
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/DefaultInfoBoxTestClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultInfoBoxTestClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 |
12 |
13 | @interface DefaultInfoBoxTestClass : UIViewController
14 | {
15 |
16 | IBOutlet UITableView *myTableView;
17 | BasicPieChart *myPieChart;
18 | BasicPieChart *myPieChart1;
19 | BasicPieChart *myPieChart2;
20 | BasicPieChart *myPieChart3;
21 | BasicPieChart *myPieChart4;
22 | }
23 |
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/DetailViewStyle2.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewStyle2.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/15/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 |
12 | @interface DetailViewStyle2 : UIViewController
13 | {
14 | IBOutlet UITableView *myTableView;
15 | BasicPieChart *myPieChart;
16 |
17 |
18 | }
19 | @end
20 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/DetailViewStyle3.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewStyle3.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/15/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 |
12 | @interface DetailViewStyle3 : UIViewController
13 | {
14 | IBOutlet UITableView *myTableView;
15 | BasicPieChart *myPieChart;
16 |
17 |
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/GaugeGraphTestClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // GaugeGraphTestClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/3/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "GaugeGraph.h"
11 |
12 | @interface GaugeGraphTestClass : UIViewController
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/GaugeGraphTestClass.m:
--------------------------------------------------------------------------------
1 | //
2 | // GaugeGraphTestClass.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/3/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "GaugeGraphTestClass.h"
10 |
11 | @interface GaugeGraphTestClass ()
12 |
13 | @end
14 |
15 | @implementation GaugeGraphTestClass
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | //[self.view setBackgroundColor:[UIColor blackColor]];
29 |
30 | NSArray *keysArray=[NSArray arrayWithObjects:@"range",@"color", nil];
31 | NSArray *val1=[NSArray arrayWithObjects:@"0,30",@"1,0,0", nil];
32 | NSArray *val2=[NSArray arrayWithObjects:@"30,80",@"1,1,0", nil];
33 | NSArray *val3=[NSArray arrayWithObjects:@"80,100",@"0,1,0", nil];
34 |
35 | NSDictionary *a1=[NSDictionary dictionaryWithObjects:val1 forKeys:keysArray];
36 | NSDictionary *a2=[NSDictionary dictionaryWithObjects:val2 forKeys:keysArray];
37 | NSDictionary *a3=[NSDictionary dictionaryWithObjects:val3 forKeys:keysArray];
38 |
39 | GaugeGraph *graph=[[GaugeGraph alloc]initWithFrame:CGRectMake(50, 50, 250, 250)];
40 | graph.gaugeValueArray=[NSArray arrayWithObjects:a1,a2,a3,nil];
41 | graph.currentValue=80; //This should be in terms of percentage
42 | [self.view addSubview:graph];
43 | [graph drawGaugeGraph];
44 |
45 |
46 | [super viewDidLoad];
47 | // Do any additional setup after loading the view.
48 | }
49 |
50 | - (void)viewDidUnload
51 | {
52 | [super viewDidUnload];
53 | // Release any retained subviews of the main view.
54 | }
55 |
56 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
57 | {
58 | return YES;
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/GroupBarTestClass.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // GroupBarTestClass.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 28/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "MIMBarGraph.h"
28 | #import "MIMColor.h"
29 |
30 | @interface GroupBarTestClass : UIViewController
31 | {
32 |
33 | IBOutlet UITableView *myTableView;
34 | MIMBarGraph *myBarChart;
35 | NSDictionary *barProperty;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/InfoBoxStyle1TestClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // InfoBoxStyle1TestClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 |
12 |
13 | @interface InfoBoxStyle1TestClass : UIViewController
14 | {
15 |
16 | IBOutlet UITableView *myTableView;
17 | BasicPieChart *myPieChart;
18 | BasicPieChart *myPieChart1;
19 |
20 |
21 | }
22 |
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/InfoBoxStyle2TestClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // InfoBoxStyle2TestClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 |
12 |
13 | @interface InfoBoxStyle2TestClass : UIViewController
14 | {
15 |
16 | IBOutlet UITableView *myTableView;
17 | BasicPieChart *myPieChart;
18 | BasicPieChart *myPieChart1;
19 |
20 | }
21 |
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/ListBasicPieCharts.h:
--------------------------------------------------------------------------------
1 | //
2 | // ListBasicPieCharts.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/28/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 | #import "MIMColorClass.h"
12 | #import "PageControl.h"
13 | @interface ListBasicPieCharts : UIViewController
14 | {
15 |
16 | IBOutlet UITableView *myTableView;
17 |
18 | BasicPieChart *myPieChart;
19 | BasicPieChart *myPieChart1;
20 | BasicPieChart *myPieChart2;
21 | BasicPieChart *myPieChart3;
22 |
23 |
24 | }
25 | @end
26 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/ListBevelPieCharts.h:
--------------------------------------------------------------------------------
1 | //
2 | // ListBevelPieCharts.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/30/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BevelPieChart.h"
11 | @interface ListBevelPieCharts : UIViewController
12 | {
13 |
14 | IBOutlet UITableView *myTableView;
15 |
16 | BevelPieChart *myPieChart;
17 | BevelPieChart *myPieChart1;
18 | BevelPieChart *myPieChart2;
19 | BevelPieChart *myPieChart3;
20 |
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/ListBiTransPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // ListBiTransPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BiTransPieChart.h"
11 | @interface ListBiTransPieChart : UIViewController
12 | {
13 |
14 | IBOutlet UITableView *myTableView;
15 |
16 |
17 | BiTransPieChart *myPieChart;
18 | BiTransPieChart *myPieChart1;
19 |
20 |
21 | }
22 |
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/ListPaddedPieCharts.h:
--------------------------------------------------------------------------------
1 | //
2 | // PaddedPieCharts.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "PaddedPieChart.h"
11 | @interface ListPaddedPieCharts : UIViewController
12 | {
13 |
14 | IBOutlet UITableView *myTableView;
15 |
16 | PaddedPieChart *myPieChart;
17 | PaddedPieChart *myPieChart1;
18 |
19 |
20 |
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/ListSectionedPieCharts.h:
--------------------------------------------------------------------------------
1 | //
2 | // ListSectionedPieCharts.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SectionedPieChart.h"
11 | @interface ListSectionedPieCharts : UIViewController
12 | {
13 |
14 | IBOutlet UITableView *myTableView;
15 |
16 | SectionedPieChart *myPieChart;
17 |
18 |
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/MultipleBarViews.h:
--------------------------------------------------------------------------------
1 | //
2 | // MultipleBarViews.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/24/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMBarGraph.h"
11 |
12 | @interface MultipleBarViews : UIViewController
13 | {
14 | NSArray *yValuesArray;
15 | NSArray *xValuesArray;
16 | NSArray *xTitlesArray;
17 |
18 | IBOutlet MIMBarGraph *mBarChart;
19 | IBOutlet MIMBarGraph *mGroupBarChart;
20 | IBOutlet MIMBarGraph *mStackBarChart;
21 |
22 | IBOutlet UILabel *YearLabel;
23 | NSArray *yearArray;
24 | int selectedYear;
25 |
26 | }
27 | @end
28 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/RangeGraphTestClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // RangeGraphTestClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 11/1/12.
6 | //
7 | //
8 |
9 | #import
10 | #import "MIMRangeGraph.h"
11 | @interface RangeGraphTestClass : UIViewController
12 | {
13 | IBOutlet UITableView *myTableView;
14 | MIMRangeGraph *mRangeGraph;
15 | NSMutableArray *dataArrayFromCSV;
16 | NSMutableArray *xDataArrayFromCSV;
17 | NSArray *anchorPropertiesArray;
18 | NSDictionary *horizontalLinesProperties;
19 | NSDictionary *verticalLinesProperties;
20 |
21 | NSArray *yValuesArray;
22 | NSArray *xValuesArray;
23 | NSArray *xNumArray;
24 | NSArray *xTitlesArray;
25 |
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/StackedBarTestClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // StackedBarTestClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/28/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMBarGraph.h"
11 | #import "MIMColor.h"
12 | @interface StackedBarTestClass : UIViewController
13 | {
14 | NSArray *xValuesArray;
15 | NSArray *yValuesArray;
16 | NSArray *xTitlesArray;
17 |
18 |
19 | IBOutlet UITableView *myTableView;
20 | MIMBarGraph *myBarChart;
21 | NSDictionary *barProperty;
22 | }
23 | @end
24 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/TestClassFragmented.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // TestClassFragmented.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 12/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "MIMFragmentedDoughNut.h"
28 |
29 | @interface TestClassFragmented : UIViewController
30 | {
31 |
32 | IBOutlet UITableView *myTable;
33 | float innerRadius;
34 | float outerRadius;
35 | NSArray *colorsArray;
36 | NSArray *titlesArray;
37 | NSArray *valuesArray;
38 |
39 |
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/TestLineClass.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 |
20 | //
21 |
22 | // TestLineClass.h
23 | // MIMChartLib
24 | //
25 | // Created by Reetu Raj on 15/08/11.
26 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
27 | //
28 |
29 | #import
30 |
31 | #import "MIMLineGraph.h"
32 |
33 | @interface TestLineClass : UIViewController
34 | {
35 | IBOutlet UITableView *myTableView;
36 | MIMLineGraph *mLineGraph;
37 | NSMutableArray *dataArrayFromCSV;
38 | NSMutableArray *xDataArrayFromCSV;
39 | NSArray *anchorPropertiesArray;
40 | NSDictionary *horizontalLinesProperties;
41 | NSDictionary *verticalLinesProperties;
42 |
43 | NSArray *yValuesArray;
44 | NSArray *xValuesArray;
45 | NSArray *xTitlesArray;
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/TestLineClass2.h:
--------------------------------------------------------------------------------
1 | //
2 | // TestLineClass2.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/24/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TestLineClass2 : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/TestLineClass2.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestLineClass2.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/24/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "TestLineClass2.h"
10 | #import
11 |
12 | @interface TestLineClass2 ()
13 |
14 | @end
15 |
16 | @implementation TestLineClass2
17 |
18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
19 | {
20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
21 | if (self) {
22 | // Custom initialization
23 | }
24 | return self;
25 | }
26 |
27 | - (void)viewDidLoad
28 | {
29 |
30 |
31 |
32 |
33 | [super viewDidLoad];
34 | // Do any additional setup after loading the view from its nib.
35 | }
36 |
37 | - (void)viewDidUnload
38 | {
39 | [super viewDidUnload];
40 | // Release any retained subviews of the main view.
41 | // e.g. self.myOutlet = nil;
42 | }
43 |
44 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
45 | {
46 | return YES;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/UserDefinedDetailView.h:
--------------------------------------------------------------------------------
1 | //
2 | // UserDefinedDetailView.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/15/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "BasicPieChart.h"
11 | #import "PageControl.h"
12 |
13 |
14 | @interface UserDefinedDetailView : UIViewController
15 | {
16 |
17 | BasicPieChart *myPieChart;
18 |
19 |
20 | float sum;
21 | NSArray *valueArray;
22 | NSArray *titleArray;
23 |
24 | }
25 |
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/WallTestClass.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | // WallTestClass.h
21 | // MIMChartLib
22 | //
23 | // Created by Reetu Raj on 13/08/11.
24 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
25 | //
26 |
27 | #import
28 | #import "MIMColor.h"
29 | #import "MIMWallGraph.h"
30 | #import "DataManager.h" /*Needed only because I am fetching the sample data to be drawn on Wallgraph*/
31 |
32 |
33 | @interface WallTestClass : UIViewController
34 | {
35 |
36 |
37 | IBOutlet UITableView *myTableView;
38 | MIMWallGraph *mWallGraph;
39 |
40 | NSMutableArray *dataArrayFromCSV;
41 | NSMutableArray *xDataArrayFromCSV;
42 |
43 |
44 | NSArray *yValuesArray;
45 | NSArray *xValuesArray;
46 | NSArray *xTitlesArray;
47 | NSArray *wallPropertiesArray;
48 |
49 | NSDictionary *xProperty;
50 | NSDictionary *yProperty;
51 |
52 | NSDictionary *horizontalLinesProperties;
53 | NSDictionary *verticalLinesProperties;
54 |
55 |
56 | DataManager *dataManager_;
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/bird1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/bird1.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/bird2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/bird2.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/bird3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/bird3.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/bird4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/bird4.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/dog1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/dog1.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/dog2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/dog2.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/dog3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/dog3.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/feline1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/feline1.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/feline2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/feline2.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/feline3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/feline3.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/ham1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/ham1.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/ham2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/ham2.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/ham3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/ham3.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/horse1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/horse1.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/horse2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/horse2.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/rabbit1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/rabbit1.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/imageForPopUp/rabbit2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/imageForPopUp/rabbit2.jpg
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito1.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito2.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito3.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito4.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito5.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito6.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/pajarito7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/pajarito7.png
--------------------------------------------------------------------------------
/MIMChartLib/How to Use/trans_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/How to Use/trans_icon.png
--------------------------------------------------------------------------------
/MIMChartLib/Level2iPadController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Level2iPadController.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/25/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "ListBasicPieCharts.h"
11 | #import "ListBevelPieCharts.h"
12 | #import "ListPaddedPieCharts.h"
13 | #import "ListBiTransPieChart.h"
14 | #import "ListSectionedPieCharts.h"
15 |
16 | #import "ChartAnimation.h"
17 |
18 | #import "DefaultDetailView.h"
19 | #import "DetailViewStyle2.h"
20 | #import "DetailViewStyle3.h"
21 | #import "UserDefinedDetailView.h"
22 |
23 | #import "DefaultInfoBoxTestClass.h"
24 | #import "InfoBoxStyle1TestClass.h"
25 | #import "InfoBoxStyle2TestClass.h"
26 |
27 |
28 | #import "TestLineClass.h"
29 | #import "TestLineClass2.h"
30 |
31 |
32 | #import "TestClassFragmented.h"
33 |
34 | #import "WallTestClass.h"
35 |
36 |
37 |
38 | #import "BarTestClass.h"
39 | #import "GroupBarTestClass.h"
40 | #import "StackedBarTestClass.h"
41 | #import "MultipleBarViews.h"
42 |
43 | #import "GaugeGraphTestClass.h"
44 | #import "RangeGraphTestClass.h"
45 |
46 |
47 | @interface Level2iPadController : UIViewController
48 | {
49 | IBOutlet UITableView *myTableView;
50 | NSArray *chartTypeSectionArray;
51 | NSArray *featureListCellArray;
52 | NSString *titleString;
53 | }
54 | @property(nonatomic,retain)NSString *titleString;
55 | @end
56 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/.DS_Store
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/Anchor.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // Anchor.h
20 | // MIM2D Library
21 | //
22 | // Created by Reetu Raj on 07/07/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "AnchorDelegate.h"
28 | #import "Constant.h"
29 |
30 |
31 | @interface Anchor : UIView
32 | {
33 |
34 | id delegate;
35 | long int anchorTag;
36 | NSDictionary *properties;
37 |
38 | @private
39 | UITapGestureRecognizer *tapGesture;
40 |
41 | }
42 | @property(nonatomic,strong)id delegate;
43 | @property(nonatomic,assign)long int anchorTag;
44 | @property(nonatomic,retain)NSDictionary *properties;
45 |
46 |
47 | -(void)drawAnchor;
48 | -(void)createPopOutAnimation;
49 | -(void)createBounceAnimation;
50 | @end
51 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/AnchorDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AnchorDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/29/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #ifndef MIMChartLib_AnchorDelegate_h
10 | #define MIMChartLib_AnchorDelegate_h
11 | @protocol AnchorDelegate
12 | -(void)displayAnchorInfo:(NSInteger)tagID At:(CGPoint)point;
13 | @end
14 | #endif
15 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/AnchorInfo.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // AnchorInfo.h
20 | // MIM2D Library
21 | //
22 | // Created by Reetu Raj on 27/07/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import
28 |
29 | @interface AnchorInfo : UIView {
30 |
31 | NSString *infoString;
32 | NSInteger tagID;
33 | BOOL displaying;
34 | }
35 | @property(nonatomic,retain) NSString *infoString;
36 | @property(nonatomic,assign) NSInteger tagID;
37 | @property(nonatomic,assign) BOOL displaying;
38 | @end
39 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/AnchorInfo.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // AnchorInfo.m
20 | // MIM2D Library
21 | //
22 | // Created by Reetu Raj on 27/07/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import "AnchorInfo.h"
27 |
28 |
29 | @implementation AnchorInfo
30 | @synthesize infoString,tagID;
31 | @synthesize displaying;
32 |
33 |
34 | - (id)initWithFrame:(CGRect)frame
35 | {
36 | self = [super initWithFrame:frame];
37 | if (self) {
38 | // Initialization code
39 | infoString=@"";
40 | self.backgroundColor=[UIColor clearColor];
41 | displaying=YES;
42 | }
43 | return self;
44 | }
45 |
46 |
47 | // Only override drawRect: if you perform custom drawing.
48 | // An empty implementation adversely affects performance during animation.
49 | - (void)drawRect:(CGRect)rect
50 | {
51 |
52 | // Drawing code
53 | CGContextRef context = UIGraphicsGetCurrentContext();
54 |
55 |
56 | //Clear the color of background
57 | CGContextSetLineWidth(context, 20.0);
58 | CGContextSetBlendMode(context,kCGBlendModeClear);
59 | CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
60 | CGContextAddRect(context, rect);
61 | CGContextStrokePath(context);
62 |
63 |
64 |
65 | CGContextSetBlendMode(context,kCGBlendModeNormal);
66 | //Flip the context so that the text will appear right ,
67 | //otherwise it appears upside down and its mirror image.
68 | CGAffineTransform flipTransform = CGAffineTransformMake( 1, 0, 0, -1, 0, self.frame.size.height);
69 | CGContextConcatCTM(context, flipTransform);
70 |
71 | if([infoString length]>1)
72 | {
73 |
74 | NSInteger _stringLength=[infoString length];
75 |
76 |
77 | //Convert NSString to CFStringRef
78 | // Initialize an attributed string.
79 | //Copy the CFStringRef to CFMutableAttributedStringRef
80 | CFStringRef string = (__bridge CFStringRef) infoString;
81 | CFMutableAttributedStringRef attrString = CFAttributedStringCreateMutable(kCFAllocatorDefault, 0);
82 | CFAttributedStringReplaceString (attrString,CFRangeMake(0, 0), string);
83 |
84 |
85 |
86 |
87 |
88 | CGColorRef _red=[UIColor blackColor].CGColor;
89 |
90 | //Lets have our string as red
91 | CFAttributedStringSetAttribute(attrString, CFRangeMake(0, _stringLength),kCTForegroundColorAttributeName, _red);
92 |
93 |
94 | CTFontRef font = CTFontCreateWithName((CFStringRef)@"Helvetica", 12.0f, nil);
95 | CFAttributedStringSetAttribute(attrString,CFRangeMake(0, _stringLength),kCTFontAttributeName,font);
96 |
97 | //Set the paragrapgh attribute
98 | CTTextAlignment alignment = kCTRightTextAlignment;
99 | CTParagraphStyleSetting _settings[] = { {kCTParagraphStyleSpecifierAlignment, sizeof(alignment), &alignment} };
100 | CTParagraphStyleRef paragraphStyle = CTParagraphStyleCreate(_settings, sizeof(_settings) / sizeof(_settings[0]));
101 | CFAttributedStringSetAttribute(attrString, CFRangeMake(0, _stringLength), kCTParagraphStyleAttributeName, paragraphStyle);
102 |
103 |
104 | CTLineRef line = CTLineCreateWithAttributedString(attrString);
105 |
106 | // Set text position and draw the line into the graphics context
107 | CGContextSetTextPosition(context,2,2);
108 | CTLineDraw(line, context);
109 | CFRelease(line);
110 |
111 |
112 | }
113 |
114 |
115 |
116 | }
117 |
118 | - (void)dealloc
119 | {
120 |
121 | }
122 |
123 | @end
124 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/Constant.h:
--------------------------------------------------------------------------------
1 | #import "Anchor.h"
2 | #import "AnchorInfo.h"
3 | #import "MIMColor.h"
4 | #import "MIMColorClass.h"
5 | #import "LineInfoBox.h"
6 | #import "YAxisBand.h"
7 | #import "XAxisBand.h"
8 | #import "MIM_MathClass.h"
9 | #import "LineScrollView.h"
10 | #import "MIMMeter.h"
11 | #import "BarInfoBox.h"
12 | #import "MIMProperties.h"
13 | #import "MIMFloatingView.h"
14 |
15 |
16 | #import
17 | #import
18 | #ifdef DEBUG
19 | #define DEBUG_MODE 1
20 | #endif
21 |
22 | #ifndef DEBUG
23 | #define DEBUG_MODE 0
24 | #endif
25 |
26 | #define X_AXIS_HEIGHT 100
27 |
28 | typedef enum
29 | {
30 | USERDEFINED=1,
31 | REDTINT,
32 | GREENTINT,
33 | BEIGETINT
34 |
35 | }TINTCOLOR;
36 |
37 |
38 | typedef enum{
39 |
40 | SQUAREFILLED=1,
41 | SQUAREBORDER=2,
42 | CIRCLEFILLED=3,
43 | CIRCLEBORDER=4,
44 | CIRCLE=5,//Circle with border as fill Color
45 | SQUARE=6,
46 | NONE=7,
47 | DEFAULT=8,
48 |
49 | }ANCHORTYPE;
50 |
51 |
52 | typedef enum
53 | {
54 | GTYPE_USERDEFINED,
55 | GTYPE_DEFAULT,
56 | GTYPE_RADIAL,
57 | GTYPE_HLINEAR,
58 | GTYPE_VLINEAR,
59 | GTYPE_ALINEAR //AT SOME ANGLE BUT ITS LINEAR
60 |
61 | }GRADIENTTYPE;
62 |
63 |
64 | typedef enum
65 | {
66 | ALIGNMENT_CENTER,
67 | ALIGNMENT_LEFT,
68 | ALIGNMENT_RIGHT,
69 | ALIGNMENT_TOP,
70 | ALIGNMENT_BOTTOM,
71 |
72 | }ALIGNMENT;
73 |
74 | typedef enum
75 | {
76 | DIRECTION_LEFT,
77 | DIRECTION_RIGHT,
78 | DIRECTION_TOP,
79 | DIRECTION_BOTTOM,
80 |
81 | }DIRECTION;
82 |
83 |
84 |
85 |
86 | typedef enum
87 | {
88 | mPIE_DETAIL_POPUP_TYPE1=1,
89 | mPIE_DETAIL_POPUP_TYPE2,
90 | mPIE_DETAIL_POPUP_TYPE3,
91 | mPIE_DETAIL_POPUP_TYPE4,
92 | mPIE_DETAIL_POPUP_TYPE5,
93 | mPIE_DETAIL_POPUP_USERDEFINED,
94 |
95 | }PIE_DETAIL_POPUP_TYPE;
96 |
97 |
98 | typedef enum
99 | {
100 | POPUP_ARROW_WHITE=1,
101 | POPUP_ARROW_BLACK,
102 |
103 | }POPUP_ARROW_TINT_STYLE;
104 |
105 |
106 | typedef enum
107 | {
108 | INFOBOX_STYLE1=1, // Default one without interaction
109 | INFOBOX_STYLE2,//Rotation of pie and translation of info box up and down
110 | INFOBOX_STYLE3,//Selected Pie becomes bigger and related label in info box flashes and highlights
111 |
112 | }INFOBOX_STYLE;
113 |
114 |
115 | typedef enum
116 | {
117 | mPIE_BUBBLE_STYLE1=1,//Square
118 | mPIE_BUBBLE_STYLE2,//Circle
119 | mPIE_BUBBLE_STYLE3,//Square translates from Pie
120 | mPIE_BUBBLE_STYLE4,//Circle translates from Pie
121 | mPIE_BUBBLE_STYLE5,//Square fades In
122 | mPIE_BUBBLE_STYLE6,//Circle fades In
123 | mPIE_BUBBLE_STYLE7,//Show all by default.//User can hide them - fade them out
124 | //Later we can add more effects in disappearing/appearing
125 |
126 | }PIE_BUBBLE_STYLE;
127 |
128 |
129 |
130 | typedef enum
131 | {
132 | XTitleStyle1=1,
133 | XTitleStyle2,
134 | XTitleStyle3,
135 | XTitleStyle4,
136 | }XTitleStyle;
137 |
138 |
139 | typedef enum
140 | {
141 | WALL_PATTERN_STYLE1=1,
142 | WALL_PATTERN_STYLE2,
143 | WALL_PATTERN_STYLE3,
144 | WALL_PATTERN_STYLE4,
145 | WALL_PATTERN_STYLE5,
146 | WALL_PATTERN_STYLE_NONE,
147 | }WALL_PATTERN_STYLE;
148 |
149 |
150 | typedef enum
151 | {
152 | NONE_GRADIENT_STYLE=0,
153 | VERTICAL_GRADIENT_STYLE, //UP
154 | VERTICAL_GRADIENT_STYLE_2, //DOWN
155 | HORIZONTAL_GRADIENT_STYLE,//LEFT
156 | HORIZONTAL_GRADIENT_STYLE_2,//RIGHT
157 |
158 | }GRADIENT_STYLE;
159 |
160 |
161 | typedef enum
162 | {
163 | GLOSS_STYLE_1=1,
164 | GLOSS_STYLE_2,
165 | GLOSS_STYLE_3,
166 | GLOSS_STYLE_4,
167 | GLOSS_STYLE_5,
168 | GLOSS_NONE,
169 |
170 | }GLOSS_STYLE;
171 |
172 |
173 |
174 | typedef enum
175 | {
176 | BAR_ANIMATION_VGROW_STYLE=1,
177 |
178 | }BAR_ANIMATION_STYLE;
179 |
180 | typedef enum
181 | {
182 | BAR_LABEL_STYLE1=1,
183 | BAR_LABEL_STYLE2,
184 |
185 | }BAR_LABEL_STYLE;
186 |
187 |
188 | typedef enum
189 | {
190 | BAR_GRAPH_STYLE_DEFAULT=0,
191 | BAR_GRAPH_STYLE_GROUPED,
192 | BAR_GRAPH_STYLE_STACKED,
193 |
194 | }BAR_GRAPH_STYLE;
195 |
196 |
197 |
198 | #define LINESCROLLVIEWTAG 1000
199 | #define XBANDTAG 1001
200 | #define YBANDTAG 1002
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/CustomBox.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // CustomBox.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 17/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 |
28 |
29 | @interface CustomBox : UIView {
30 |
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/CustomBox.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // CustomBox.m
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 17/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import "CustomBox.h"
27 |
28 |
29 | @implementation CustomBox
30 |
31 | - (id)initWithFrame:(CGRect)frame
32 | {
33 | self = [super initWithFrame:frame];
34 | if (self) {
35 | // Initialization code
36 | }
37 | return self;
38 | }
39 |
40 | -(void)drawCustomBox
41 | {
42 |
43 |
44 | }
45 |
46 |
47 | /*
48 | // Only override drawRect: if you perform custom drawing.
49 | // An empty implementation adversely affects performance during animation.
50 | - (void)drawRect:(CGRect)rect
51 | {
52 | // Drawing code
53 | }
54 | */
55 |
56 | - (void)dealloc
57 | {
58 | //////[super dealloc];
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIMFloatingView.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMFloatingView.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 7/26/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MIMFloatingView : UIView
12 | {
13 | UILabel *title_;
14 | UILabel *subtitle_;
15 | UIColor *barColor;
16 | }
17 | @property(nonatomic,retain)UIColor *barColor;
18 |
19 |
20 | -(void)setLabelsOnView:(NSString *)title subtitle:(NSString *)subtitle;
21 | @end
22 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIMFloatingView.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIMFloatingView.m
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 7/26/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "MIMFloatingView.h"
10 |
11 | @implementation MIMFloatingView
12 | @synthesize barColor;
13 |
14 | - (id)initWithFrame:(CGRect)frame
15 | {
16 | self = [super initWithFrame:frame];
17 | if (self) {
18 | // Initialization code
19 | [self setBackgroundColor:[UIColor colorWithWhite:1.0 alpha:0.6]];
20 |
21 |
22 | title_=[[UILabel alloc]initWithFrame:CGRectMake(15, 2, CGRectGetWidth(self.frame), 20)];
23 | [title_ setBackgroundColor:[UIColor clearColor]];
24 | [title_ setFont:[UIFont fontWithName:@"Helvetica" size:13]];
25 | [title_ setTextColor:[UIColor blackColor]];
26 | [self addSubview:title_];
27 |
28 |
29 |
30 |
31 | subtitle_=[[UILabel alloc]initWithFrame:CGRectMake(15, 22, CGRectGetWidth(self.frame), 20)];
32 | [subtitle_ setBackgroundColor:[UIColor clearColor]];
33 | [subtitle_ setFont:[UIFont fontWithName:@"Helvetica" size:10]];
34 | [subtitle_ setTextColor:[UIColor blackColor]];
35 | [self addSubview:subtitle_];
36 | }
37 | return self;
38 | }
39 |
40 |
41 | // Only override drawRect: if you perform custom drawing.
42 | // An empty implementation adversely affects performance during animation.
43 | - (void)drawRect:(CGRect)rect
44 | {
45 |
46 |
47 |
48 | CGContextRef ctx = UIGraphicsGetCurrentContext();
49 | CGContextSetAllowsAntialiasing(ctx, YES);
50 | CGContextSetShouldAntialias(ctx, YES);
51 |
52 |
53 | CGContextSetFillColorWithColor(ctx, barColor.CGColor);
54 | CGContextAddRect(ctx, CGRectMake(3, 8, 8, 8));
55 | CGContextSetShadowWithColor(ctx, CGSizeMake(1, 1), 2, [UIColor grayColor].CGColor);
56 | CGContextFillPath(ctx);
57 |
58 | }
59 |
60 | -(void)setLabelsOnView:(NSString *)title subtitle:(NSString *)subtitle
61 | {
62 |
63 | [title_ setText:title];
64 | [subtitle_ setText:subtitle];
65 |
66 | }
67 |
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIMMargin.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMMargin.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 12/18/12.
6 | //
7 | //
8 |
9 | #import
10 |
11 |
12 |
13 | typedef struct {
14 | float topMargin;
15 | float bottomMargin;
16 | float leftMargin;
17 | float rightMargin;
18 | } MIMMargin;
19 |
20 | static inline MIMMargin MIMMarginMake(float top, float bottom, float left, float right) {
21 | MIMMargin _margin;
22 | _margin.topMargin = top;
23 | _margin.bottomMargin = bottom;
24 | _margin.leftMargin = left;
25 | _margin.rightMargin = right;
26 | return _margin;
27 | }
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIMMargin.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIMMargin.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 12/18/12.
6 | //
7 | //
8 |
9 | #import "MIMMargin.h"
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIMMeter.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMMeter.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/5/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | @protocol MIMMeterDelegate
11 | -(void)meterCrossingAnchorPoint:(int)index;
12 | @end
13 |
14 | @interface MIMMeter : UIView
15 | {
16 | NSDictionary *mProperties;
17 | float minPointX;
18 | float maxPointX;
19 | float _tileWidth;
20 |
21 | }
22 | @property(nonatomic,assign) id delegate;
23 | @property(nonatomic,retain) NSDictionary *mProperties;
24 | @property(nonatomic,assign) float minPointX;
25 | @property(nonatomic,assign) float maxPointX;
26 | @property(nonatomic,assign) float tileWidth;
27 | @end
28 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIMProperties.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMProperties.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/21/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMColorClass.h"
11 |
12 |
13 | @interface MIMProperties : NSObject
14 | {
15 |
16 | }
17 | +(void)drawHorizontalBgLines:(CGContextRef)ctx withProperties:(NSDictionary *)hlProperties gridHeight:(float)gridHeight tileHeight:(float)tileHeight gridWidth:(float)gridWidth leftMargin:(float)leftMargin topMargin:(float)topMargin;
18 |
19 | +(void)drawVerticalBgLines:(CGContextRef)ctx withProperties:(NSDictionary *)vlProperties gridHeight:(float)gridHeight tileWidth:(float)tileWidth gridWidth:(float)gridWidth scalingX:(float)scalingX xIsString:(BOOL)xIsString bottomMargin:(float)bottomMargin leftMargin:(float)leftMargin topMargin:(float)topMargin;
20 |
21 | +(void)drawBgPattern:(CGContextRef)ctx color:(MIMColorClass *)mbackgroundColor gridWidth:(float)gridWidth gridHeight:(float)gridHeight leftMargin:(float)leftMargin topMargin:(float)topMargin;
22 |
23 |
24 | +(void)createGloss:(CGContextRef)context OnRect:(CGRect)rect withStyle:(int)glossStyle;
25 |
26 |
27 | +(BOOL)findIfItIsALongGraph:(int)tileWidth TotalItemsOnXAxis:(int)totalItemsOnX GridWidth:(float)gridWidth;
28 | +(float)returnLongGraphContentWidth:(int)tileWidth TotalItemsOnXAxis:(int)totalItemsOnX;
29 | +(int)countXValuesInArray:(NSMutableArray *)xValElements;
30 |
31 | +(float)CalculateGridWidth:(float)gwidth leftMargin:(float)lMargin rightMargin:(float)rMargin yAxisSpace:(float)ySpace;
32 | +(float)CalculateGridHeight:(float)gheight bottomMargin:(float)bMargin topMargin:(float)tMargin xAxisSpace:(float)xSpace;
33 |
34 | +(float)FindTileWidth:(NSMutableDictionary *)vlProperties GridWidth:(float)gridWidth xItemsCount:(int)xCount;
35 | +(float)FindTileHeight:(NSMutableDictionary *)hlProperties GridHeight:(float)gridHeight;
36 | //+(float)findScaleForYTile:(NSMutableArray *)yValElements gridHeight:(float)gridHeight tileHeight:(float)tileHeight :(int)countHLines;
37 | +(float)findMinimumOnY:(float)minOfY;
38 | +(float)findMinimumOnYForHandlingNegative:(float)minOfY withPPT:(float)scalingY;
39 |
40 |
41 |
42 | +(float)findScaleForXTile:(NSMutableArray *)xValElements XValuesAreString:(BOOL)xIsString LongGraph:(BOOL)isLongGraph TileWidth:(float)tileWidth TileWidthDefinedByUser:(BOOL)tileWidthDefinedByUser;
43 | +(float)findScaleForYTile:(NSMutableArray *)yValElements gridHeight:(float)gridHeight tileHeight:(float)tileHeight :(int)countHLines Min:(float)minOfY Max:(float)maxOfY;
44 |
45 | +(float)fixTileHeight:(float)gridHeight;
46 | +(float)findGlobalMinimum:(NSMutableArray *)yValElements;
47 | +(float)findGlobalMaximum:(NSMutableArray *)yValElements;
48 | @end
49 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIM_MathClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIM_MathClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/23/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MIM_MathClass : NSObject
12 | {
13 |
14 | }
15 |
16 | +(int)getMaxIntValue:(NSArray *)array;
17 | +(float)getMaxFloatValue:(NSArray *)array;
18 | +(float)getMinFloatValue:(NSArray *)array;
19 |
20 | +(BOOL)checkIfStringIsAlphaNumericOnly:(NSString*)string;
21 | @end
22 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/MIM_MathClass.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIM_MathClass.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/23/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "MIM_MathClass.h"
10 |
11 | @implementation MIM_MathClass
12 |
13 | +(int)getMaxIntValue:(NSArray *)array
14 | {
15 | int maxVal=[[array objectAtIndex:0] intValue];
16 | for (int i=1; i<[array count]; i++) {
17 |
18 | if(maxVal<[[array objectAtIndex:i] intValue])
19 | maxVal=[[array objectAtIndex:i] intValue];
20 | }
21 | return maxVal;
22 |
23 | }
24 |
25 | +(float)getMaxFloatValue:(NSArray *)array
26 | {
27 | float maxVal=[[array objectAtIndex:0] floatValue];
28 | for (int i=1; i<[array count]; i++) {
29 |
30 | if(maxVal<[[array objectAtIndex:i] floatValue])
31 | maxVal=[[array objectAtIndex:i] floatValue];
32 | }
33 | return maxVal;
34 |
35 | }
36 |
37 | +(float)getMinFloatValue:(NSArray *)array
38 | {
39 | float minVal=[[array objectAtIndex:0] floatValue];
40 | for (int i=1; i<[array count]; i++) {
41 |
42 | if(minVal>[[array objectAtIndex:i] floatValue])
43 | minVal=[[array objectAtIndex:i] floatValue];
44 | }
45 | return minVal;
46 |
47 | }
48 |
49 | +(BOOL)checkIfStringIsAlphaNumericOnly:(NSString*)string
50 | {
51 | BOOL valid;
52 |
53 | NSMutableCharacterSet *_NumericOnly = [NSMutableCharacterSet characterSetWithCharactersInString:@""];
54 | [_NumericOnly formUnionWithCharacterSet:[NSCharacterSet decimalDigitCharacterSet]];
55 | NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:string];
56 | valid = [_NumericOnly isSupersetOfSet:inStringSet];
57 |
58 | if (!valid)
59 | {
60 | //Its not entirely numeric.
61 | return TRUE;
62 |
63 | }
64 | return FALSE;
65 |
66 | }
67 |
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/PageControl.h:
--------------------------------------------------------------------------------
1 | //
2 | // PageControl.h
3 | // Retail Analytics
4 | //
5 | // Created by Mac Mac on 2/13/12.
6 | // Copyright (c) 2012 iMobDev. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //@class PageControl;
12 | //@protocol PageControlDelegate
13 | //
14 | //- (void)pageControlPageDidChange:(PageControl *)pageControl;
15 | //@end
16 |
17 | @interface PageControl : UIView
18 | {
19 |
20 | NSInteger _currentPage;
21 | NSInteger _numberOfPages;
22 | //id delegate;
23 |
24 | }
25 |
26 | @property (nonatomic,assign) NSInteger currentPage;
27 | @property (nonatomic,assign) NSInteger numberOfPages;
28 | //@property (nonatomic, strong) id delegate;
29 |
30 |
31 | @end
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/PageControl.m:
--------------------------------------------------------------------------------
1 | //
2 | // PageControl.m
3 | // Retail Analytics
4 | //
5 | // Created by Mac Mac on 2/13/12.
6 | // Copyright (c) 2012 _MyCompany_. All rights reserved.
7 | //
8 |
9 | #import "PageControl.h"
10 |
11 | @implementation PageControl
12 | @synthesize currentPage,numberOfPages;
13 | //@synthesize delegate;
14 | // Tweak these or make them dynamic.
15 | #define kDotDiameter 7.0
16 | #define kDotSpacer 7.0
17 |
18 |
19 |
20 | - (NSInteger)currentPage
21 | {
22 | return _currentPage;
23 | }
24 |
25 | - (void)setCurrentPage:(NSInteger)page
26 | {
27 | _currentPage = MIN(MAX(0, page), _numberOfPages-1);
28 | [self setNeedsDisplay];
29 | }
30 |
31 | - (NSInteger)numberOfPages
32 | {
33 | return _numberOfPages;
34 | }
35 |
36 | - (void)setNumberOfPages:(NSInteger)pages
37 | {
38 | _numberOfPages = MAX(0, pages);
39 | _currentPage = MIN(MAX(0, _currentPage), _numberOfPages-1);
40 | [self setNeedsDisplay];
41 | }
42 |
43 | - (id)initWithFrame:(CGRect)frame
44 | {
45 | if ((self = [super initWithFrame:frame]))
46 | {
47 | // Default colors.
48 | self.backgroundColor = [UIColor clearColor];
49 |
50 | }
51 | return self;
52 | }
53 |
54 | - (void)drawRect:(CGRect)rect
55 | {
56 | CGContextRef context = UIGraphicsGetCurrentContext();
57 | CGContextSetAllowsAntialiasing(context, true);
58 |
59 | CGRect currentBounds = self.bounds;
60 | CGFloat dotsWidth = self.numberOfPages*kDotDiameter + MAX(0, self.numberOfPages-1)*kDotSpacer;
61 | CGFloat x = CGRectGetMidX(currentBounds)-dotsWidth/2;
62 | CGFloat y = CGRectGetMidY(currentBounds)-kDotDiameter/2;
63 | for (int i=0; i<_numberOfPages; i++)
64 | {
65 | CGRect circleRect = CGRectMake(x, y, kDotDiameter, kDotDiameter);
66 | if (i == _currentPage)
67 | {
68 | CGContextSetFillColorWithColor(context, [UIColor orangeColor].CGColor);
69 | }
70 | else
71 | {
72 | CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
73 | }
74 | CGContextFillEllipseInRect(context, circleRect);
75 | x += kDotDiameter + kDotSpacer;
76 | }
77 | }
78 |
79 |
80 | /*
81 |
82 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
83 | {
84 | // if (!self.delegate) return;
85 |
86 | CGPoint touchPoint = [[[event touchesForView:self] anyObject] locationInView:self];
87 |
88 | CGFloat dotSpanX = self.numberOfPages*(kDotDiameter + kDotSpacer);
89 | CGFloat dotSpanY = kDotDiameter + kDotSpacer;
90 |
91 | CGRect currentBounds = self.bounds;
92 | CGFloat x = touchPoint.x + dotSpanX/2 - CGRectGetMidX(currentBounds);
93 | CGFloat y = touchPoint.y + dotSpanY/2 - CGRectGetMidY(currentBounds);
94 |
95 | if ((x<0) || (x>dotSpanX) || (y<0) || (y>dotSpanY)) return;
96 |
97 | self.currentPage = floor(x/(kDotDiameter+kDotSpacer));
98 | //if ([self.delegate respondsToSelector:@selector(pageControlPageDidChange:)])
99 | {
100 | [self.delegate pageControlPageDidChange:self];
101 | }
102 | }
103 |
104 |
105 |
106 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
107 |
108 | CGPoint touchPoint = [[[event touchesForView:self] anyObject] locationInView:self];
109 |
110 | CGRect currentBounds = self.bounds;
111 | CGFloat x = touchPoint.x - CGRectGetMidX(currentBounds);
112 |
113 | if(x<0 && self.currentPage>=0){
114 | self.currentPage--;
115 | [self.delegate pageControlPageDidChange:self];
116 | }
117 | else if(x>0 && self.currentPage
27 | #import
28 | #import "MIMColorClass.h"
29 | #import "Constant.h"
30 |
31 | @interface XAxisBand : UIView {
32 |
33 | NSArray *xElements;
34 | float _tileWidth;
35 | float _gridWidth;
36 | float scalingFactor;
37 | float gapDistance;//Gap between two labels;
38 | float groupGapDistance;
39 | float barWidth;
40 | int style;
41 | BOOL lineChart;
42 | BOOL barChart;
43 | BOOL groupBarChart;
44 | BOOL stackedBarChart;
45 |
46 | BOOL xIsString;
47 | float lineWidth;
48 | float xAxisHeight;
49 |
50 | UIColor *lineColor;
51 | NSDictionary *properties;
52 | NSArray *groupTitles;
53 | float groupTitleOffset;
54 | UIColor *groupTitleColor;
55 | UIColor *groupTitleBgColor;
56 | BOOL hideSticks;
57 |
58 | float fontSize;
59 | float xoffset;
60 |
61 | }
62 | @property(nonatomic,retain)NSArray *xElements;
63 | @property(nonatomic,assign)float scalingFactor;
64 | @property(nonatomic,assign)int style;
65 | @property(nonatomic,assign)BOOL lineChart;
66 | @property(nonatomic,assign)BOOL barChart;
67 | @property(nonatomic,assign)BOOL xIsString;
68 | @property(nonatomic,assign)float gapDistance;//Gap between two labels;
69 | @property(nonatomic,assign)float lineWidth;
70 | @property(nonatomic,retain)UIColor *lineColor;
71 | @property(nonatomic,retain)NSDictionary *properties;
72 | @property(nonatomic,retain)NSArray *groupTitles;
73 | @property(nonatomic,assign)float groupTitleOffset;
74 | @property(nonatomic,assign) float fontSize;
75 |
76 |
77 | -(void)drawXAxis:(CGContextRef)ctx;
78 |
79 |
80 | @end
81 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/XAxisLabel.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // XAxisLabel.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 15/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 |
28 |
29 | @interface XAxisLabel : UIView {
30 |
31 | NSString *text;
32 | NSInteger labelTag;
33 | NSInteger style;
34 | float width;
35 | float height;
36 | float offset;
37 |
38 | BOOL lineChart;
39 | UIColor *xTitleColor;
40 | UIColor *mBackgroundColor;
41 | float fontSize;
42 | }
43 |
44 | -(void)drawTitleWithColor:(UIColor *)color;
45 |
46 | @property(nonatomic,retain) NSString *text;
47 | @property(nonatomic,assign) NSInteger labelTag;
48 | @property(nonatomic,assign) NSInteger style;
49 | @property(nonatomic,assign) float width;
50 | @property(nonatomic,assign) float height;
51 | @property(nonatomic,assign) float offset;
52 |
53 | @property(nonatomic,assign) BOOL lineChart;
54 | @property(nonatomic,retain) UIColor *mBackgroundColor;
55 | @property(nonatomic,assign) float fontSize;
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Accessories/YAxisBand.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // YAxisBand.h
20 | // MIM2D Library
21 | //
22 | // Created by Reetu Raj on 08/07/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import
28 | #import "MIMColorClass.h"
29 | #import "Constant.h"
30 |
31 | @interface YAxisBand : UIView {
32 |
33 |
34 | NSDictionary *properties;
35 | NSArray *yTitles;
36 |
37 | }
38 | @property(nonatomic,retain)NSDictionary *properties;
39 | @property(nonatomic,retain)NSArray *yTitles;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Bar Chart/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Bar Chart/.DS_Store
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Bar Chart/BarGraphDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // BarChartDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/30/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 | #import "Constant.h"
9 | #import "MIMColorClass.h"
10 |
11 | #ifndef MIMChartLib_BarChartDelegate_h
12 | #define MIMChartLib_BarChartDelegate_h
13 | @protocol BarGraphDelegate
14 | @optional
15 |
16 | -(NSArray *)valuesForGraph:(id)graph; /*This values are plot on Y-Axis*/
17 | -(NSArray *)valuesForXAxis:(id)graph;/*This values are plot on X-Axis*/
18 | -(NSArray *)titlesForXAxis:(id)graph;/*These titles are displayed on X-Axis*/
19 | -(NSArray *)titlesForYAxis:(id)graph;/*If given,These titles are displayed on Y-Axis*/
20 | -(NSArray *)grouptitlesForXAxis:(id)graph;/*If given,These titles are displayed on Y-Axis for groups*/
21 | -(NSDictionary *)xAxisProperties:(id)graph;//hide,color,width,height,style,groupTitleColor,groupTitleBgColor
22 | -(NSDictionary *)yAxisProperties:(id)graph;//hide,color,width,style
23 |
24 |
25 | -(NSDictionary *)horizontalLinesProperties:(id)graph; //hide,color,gap,width,dotted(@"1,1")
26 | -(NSDictionary *)verticalLinesProperties:(id)graph;
27 |
28 | -(UIView *)backgroundViewForLineChart:(id)graph;
29 | -(NSArray *)colorsForBarChart:(id)graph;
30 | -(NSDictionary *)barProperties:(id)graph; //barwidth,shadow,horGradient,verticalGradient,gapBetweenGroup,gapBetweenBars
31 | -(NSDictionary *)animationOnBars:(id)graph; //animationDelay,animationDelay,type
32 | -(NSArray *)AnchorProperties:(id)graph;
33 |
34 | -(void)externalViewHandler:(id)graph withValues:(NSDictionary *)dict;//when you touch a bar, you want effect of that on external views,use this one.
35 |
36 | @end
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Bar Chart/BarInfoBox.h:
--------------------------------------------------------------------------------
1 | //
2 | // BarInfoBox.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/10/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 |
12 | @interface BarInfoBox : UIView
13 | {
14 | NSString *text;
15 | UIFont *font;
16 | MIMColorClass *textColor;
17 | }
18 | @property(nonatomic,retain) NSString *text;
19 | @end
20 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Bar Chart/BarInfoBox.m:
--------------------------------------------------------------------------------
1 | //
2 | // BarInfoBox.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/10/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "BarInfoBox.h"
10 |
11 | @implementation BarInfoBox
12 | @synthesize text;
13 |
14 | - (id)initWithFrame:(CGRect)frame
15 | {
16 | self = [super initWithFrame:frame];
17 | if (self) {
18 | // Initialization code
19 | [self setBackgroundColor:[UIColor clearColor]];
20 | }
21 | return self;
22 | }
23 |
24 |
25 | // Only override drawRect: if you perform custom drawing.
26 | // An empty implementation adversely affects performance during animation.
27 | - (void)drawRect:(CGRect)rect
28 | {
29 | // Drawing code
30 |
31 |
32 | // Drawing code
33 | CGContextRef context = UIGraphicsGetCurrentContext();
34 |
35 |
36 | //Clear the color of background
37 | CGRect a=CGRectMake(0, 0, CGRectGetWidth(rect), CGRectGetHeight(rect));
38 | CGContextSetBlendMode(context,kCGBlendModeClear);
39 | CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor);
40 | CGContextAddRect(context, a);
41 | CGContextFillPath(context);
42 |
43 |
44 |
45 | CGContextSetBlendMode(context,kCGBlendModeNormal);
46 |
47 |
48 | //Flip the context so that the text will appear right ,
49 | //otherwise it appears upside down and its mirror image.
50 | CGAffineTransform flipTransform = CGAffineTransformMake( 1, 0, 0, -1, 0, self.frame.size.height);
51 | CGContextConcatCTM(context, flipTransform);
52 |
53 | if([text length]>1)
54 | {
55 |
56 | NSInteger _stringLength=[text length];
57 |
58 |
59 | //Convert NSString to CFStringRef
60 | // Initialize an attributed string.
61 | //Copy the CFStringRef to CFMutableAttributedStringRef
62 | CFStringRef string = (__bridge CFStringRef) text;
63 | CFMutableAttributedStringRef attrString = CFAttributedStringCreateMutable(kCFAllocatorDefault, 0);
64 | CFAttributedStringReplaceString (attrString,CFRangeMake(0, 0), string);
65 |
66 |
67 |
68 |
69 | if (!textColor)
70 | {
71 | CGColorRef _color=[UIColor grayColor].CGColor;
72 | CFAttributedStringSetAttribute(attrString, CFRangeMake(0, _stringLength),kCTForegroundColorAttributeName, _color);
73 | }
74 | else
75 | {
76 | CGColorRef _color=[UIColor colorWithRed:textColor.red green:textColor.green blue:textColor.blue alpha:textColor.alpha].CGColor;
77 | CFAttributedStringSetAttribute(attrString, CFRangeMake(0, _stringLength),kCTForegroundColorAttributeName, _color);
78 | }
79 |
80 |
81 | if(!font)
82 | {
83 | CTFontRef _font = CTFontCreateWithName((CFStringRef)@"Helvetica", 12.0f, nil);
84 | CFAttributedStringSetAttribute(attrString,CFRangeMake(0, _stringLength),kCTFontAttributeName,_font);
85 | }
86 | else
87 | {
88 | CTFontRef _font = CTFontCreateWithName((__bridge CFStringRef)font.fontName, font.pointSize, nil);
89 | CFAttributedStringSetAttribute(attrString,CFRangeMake(0, _stringLength),kCTFontAttributeName,_font);
90 | }
91 |
92 |
93 | //Set the paragrapgh attribute
94 | CTTextAlignment alignment = kCTCenterTextAlignment;
95 | CTParagraphStyleSetting _settings[] = { {kCTParagraphStyleSpecifierAlignment, sizeof(alignment), &alignment} };
96 | CTParagraphStyleRef paragraphStyle = CTParagraphStyleCreate(_settings, sizeof(_settings) / sizeof(_settings[0]));
97 | CFAttributedStringSetAttribute(attrString, CFRangeMake(0, _stringLength), kCTParagraphStyleAttributeName, paragraphStyle);
98 |
99 |
100 | // CTLineRef line = CTLineCreateWithAttributedString(attrString);
101 | //
102 | // // Set text position and draw the line into the graphics context
103 | // CGContextSetTextPosition(context,2,12);
104 | // CTLineDraw(line, context);
105 | // CFRelease(line);
106 | //
107 |
108 |
109 | // Initialize a rectangular path.
110 | CGMutablePathRef path = CGPathCreateMutable();
111 | CGRect bounds = CGRectMake(0, 0, CGRectGetWidth(rect), CGRectGetHeight(rect));
112 | CGPathAddRect(path, NULL, bounds);
113 |
114 | // Create the framesetter with the attributed string.
115 | CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(attrString);
116 | CFRelease(attrString);
117 |
118 | // Create the frame and draw it into the graphics context
119 | CTFrameRef frame = CTFramesetterCreateFrame(framesetter,CFRangeMake(0, 0), path, NULL);
120 | CFRelease(framesetter);
121 | CTFrameDraw(frame, context);
122 |
123 |
124 |
125 | }
126 | }
127 |
128 |
129 | @end
130 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Bar Chart/BarView.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // BarView.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 15/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "Constant.h"
28 |
29 | @protocol BarViewDelegate
30 |
31 | -(void)displayFloatingView:(id)view;
32 |
33 | @end
34 |
35 | @interface BarView : UIView {
36 |
37 | MIMColorClass *color;
38 | NSDictionary *lColor;
39 | NSDictionary *dColor;
40 | UIColor *borderColor;
41 | GRADIENT_STYLE gradientStyle;
42 | GLOSS_STYLE glossStyle;
43 | BOOL negativeBar;
44 |
45 |
46 |
47 | }
48 | @property(nonatomic,retain) MIMColorClass *color;
49 | @property(nonatomic,retain) NSDictionary *lColor;
50 | @property(nonatomic,retain) NSDictionary *dColor;
51 | @property(nonatomic,retain) UIColor *borderColor;
52 | @property(nonatomic,assign) GRADIENT_STYLE gradientStyle;
53 | @property(nonatomic,assign) GLOSS_STYLE glossStyle;
54 | @property(nonatomic,assign) BOOL negativeBar;
55 | @property(nonatomic,assign) id delegate;
56 | @end
57 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Bar Chart/MIMBarGraph.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // BarChart.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 15/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "MIMMargin.h"
28 |
29 | #import "BarGraphDelegate.h"
30 | #import "Constant.h"
31 | #import "BarView.h"
32 | #import "LineInfoBox.h"
33 | #import "MultiLineLongGraph.h"
34 |
35 | @interface MIMBarGraph : UIView {
36 |
37 | iddelegate;
38 | XTitleStyle xTitleStyle;//Default is XTitleStyle1
39 | BAR_GRAPH_STYLE barGraphStyle;//BOOL groupedBars BOOL stackedBars;
40 | MIMColorClass *mbackgroundcolor;
41 |
42 |
43 |
44 | GRADIENT_STYLE gradientStyle;//Default is VERTICAL_GRADIENT_STYLE // BOOL isGradient;
45 | GLOSS_STYLE glossStyle;
46 | BAR_LABEL_STYLE barLabelStyle;
47 | MIMMargin margin;
48 |
49 | BOOL minimumLabelOnYIsZero;
50 | UILabel *titleLabel;
51 |
52 |
53 |
54 | NSMutableArray *barcolorArray;
55 |
56 |
57 | int style;//Optional, incase user wants to choose a particular color from MIMColorClass //---- need to remove this
58 | float groupTitlesOffset;
59 |
60 | MIMFloatingView *floatingView;
61 | }
62 |
63 | @property(nonatomic,retain)iddelegate;
64 | @property(nonatomic,assign)XTitleStyle xTitleStyle;
65 | @property(nonatomic,assign)BAR_GRAPH_STYLE barGraphStyle;
66 | @property(nonatomic,retain)MIMColorClass *mbackgroundcolor;
67 | @property(nonatomic,retain)NSMutableArray *barcolorArray;
68 |
69 | @property(nonatomic,assign)GRADIENT_STYLE gradientStyle;
70 | @property(nonatomic,assign)GLOSS_STYLE glossStyle;
71 | @property(nonatomic,assign)BAR_LABEL_STYLE barLabelStyle;
72 | @property(nonatomic,assign)MIMMargin margin;
73 |
74 | @property(nonatomic,assign)BOOL minimumLabelOnYIsZero;
75 | @property(nonatomic,retain)UILabel *titleLabel;
76 |
77 | @property(nonatomic,assign)int style;
78 | @property(nonatomic,assign)float groupTitlesOffset;
79 |
80 |
81 |
82 |
83 | @property(nonatomic,retain)MIMFloatingView *floatingView;
84 | -(void)drawBarChart;
85 | -(void)reloadBarChartWithAnimation;
86 |
87 | -(void)drawLines:(NSArray *)pathArray;
88 | -(void)removeLines;
89 | @end
90 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/ClusterGraph/Cluster.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // Cluster.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 17/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 |
28 | typedef enum
29 | {
30 |
31 | DOTS=1,
32 | SQUARE,
33 |
34 | }Clusterstyle;
35 |
36 | @interface Cluster : UIView {
37 |
38 | Clusterstyle style;
39 | float radius;
40 | BOOL shadow;
41 | UIColor *color;
42 |
43 | }
44 |
45 | @property(nonatomic,assign) Clusterstyle style;
46 | @property(nonatomic,assign) float radius;
47 | @property(nonatomic,assign) BOOL shadow;
48 | @property(nonatomic,retain) UIColor *color;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/ClusterGraph/Cluster.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // Cluster.m
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 17/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import "Cluster.h"
27 |
28 |
29 | @implementation Cluster
30 |
31 | @synthesize style;
32 | @synthesize radius;
33 | @synthesize shadow;
34 | @synthesize color;
35 |
36 |
37 | - (id)initWithFrame:(CGRect)frame
38 | {
39 | self = [super initWithFrame:frame];
40 | if (self) {
41 | // Initialization code
42 | self.backgroundColor=[UIColor clearColor];
43 | }
44 | return self;
45 | }
46 |
47 |
48 | // Only override drawRect: if you perform custom drawing.
49 | // An empty implementation adversely affects performance during animation.
50 | - (void)drawRect:(CGRect)rect
51 | {
52 | // Drawing code
53 | CGContextRef context = UIGraphicsGetCurrentContext();
54 |
55 | CGContextSetAllowsAntialiasing(context, true);
56 | CGContextSetShouldAntialias(context, true);
57 |
58 | //clear the background
59 | // CGContextSetBlendMode(context,kCGBlendModeClear);
60 | // CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
61 | // CGContextAddRect(context, CGRectMake(0, 0, 20, 20));
62 | // CGContextStrokePath(context);
63 |
64 |
65 | CGContextSetFillColorWithColor(context, color.CGColor);
66 |
67 | float _width=CGRectGetWidth(rect);
68 | float _height=CGRectGetHeight(rect);
69 |
70 | switch (style) {
71 | case 1:
72 | CGContextFillEllipseInRect(context, CGRectMake(0, 0, radius, radius));
73 | break;
74 |
75 | case 2:
76 | CGContextFillRect(context, CGRectMake(0, 0, _width, _height));
77 | break;
78 | }
79 |
80 |
81 | }
82 |
83 |
84 | - (void)dealloc
85 | {
86 | ////[super dealloc];
87 | }
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/ClusterGraph/ClusterGraph.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // ClusterGraph.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 17/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import
28 |
29 | @interface ClusterGraph : UIView {
30 |
31 | NSMutableArray *_xElements;
32 | NSMutableArray *_yElements;
33 | float maxOfY;
34 | float _scalingX;
35 | float _scalingY;
36 | float _tileWidth;
37 | BOOL xIsString;
38 |
39 | }
40 |
41 | @property(nonatomic,assign) BOOL xIsString;
42 |
43 | -(void)ScalingFactor;
44 | -(float)FindMaxOfY;
45 | -(int)findMaximumValue:(NSArray *)array;
46 | -(void)findScaleForYTile:(float)screenHeight;
47 | -(void)findScaleForXTile;
48 | -(void)drawBackGroundGradient:(CGContextRef)context;
49 | -(void)drawClusterGraph;
50 | -(void)readYValuesFromCSV:(NSString *)path AtColumn:(int)column;
51 | -(void)readXvaluesFromCSV:(NSString *)path AtColumn:(int)column;
52 | -(void)drawHorizontalBgLines:(CGContextRef)ctx;
53 | @end
54 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/ClusterGraph/ClusterGraphDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // ClusterGraphDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/30/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #ifndef MIMChartLib_ClusterGraphDelegate_h
10 | #define MIMChartLib_ClusterGraphDelegate_h
11 |
12 |
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Colors/MIMColor.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // MIMColor.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 11/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "MIMColorClass.h"
28 |
29 |
30 | @interface MIMColor : NSObject {
31 |
32 | }
33 | +(MIMColorClass *)GetMIMColorAtIndex:(int)index;
34 | +(NSDictionary *)GetColorAtIndex:(int)index;
35 | +(void)InitColors;
36 | +(void)InitGreenTintColors;
37 | +(void)InitFragmentedBarColors;
38 | +(NSInteger)sizeOfColorArray;
39 | +(void)nonAdjacentGradient;
40 | +(void)lightGradients;
41 | +(void)nonAdjacentPlainColors;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Colors/MIMColorClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMColorClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MIMColorClass : NSObject
12 | {
13 |
14 | float red;
15 | float green;
16 | float blue;
17 | float alpha;
18 |
19 | }
20 | @property(nonatomic,assign)float red;
21 | @property(nonatomic,assign)float green;
22 | @property(nonatomic,assign)float blue;
23 | @property(nonatomic,assign)float alpha;
24 | //Set Colors
25 | +(MIMColorClass *)colorWithRed:(float)red Green:(float)green Blue:(float)blue Alpha:(float)alpha;
26 | +(MIMColorClass *)colorWithComponent:(NSString*)colorString;
27 | @end
28 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Colors/MIMColorClass.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIMColorClass.m
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "MIMColorClass.h"
10 |
11 | @interface MIMColorClass()
12 |
13 | +(NSArray *)findColors:(NSString *)colorString;
14 |
15 | @end
16 |
17 | @implementation MIMColorClass
18 | @synthesize red;
19 | @synthesize green;
20 | @synthesize blue;
21 | @synthesize alpha;
22 |
23 |
24 |
25 | /****************************************************************************************/
26 | //
27 | //
28 | // User can opt to give some values in range(0,255), others in (0,1) !
29 | // e.g MIMColorClass *a=[MIMColorClass colorWithRed:1 Green:0.18 Blue:0.17 Alpha:255];
30 | //
31 | /****************************************************************************************/
32 | +(MIMColorClass *)colorWithRed:(float)red Green:(float)green Blue:(float)blue Alpha:(float)alpha
33 | {
34 |
35 |
36 | //If there are only 3 values user gave only
37 | NSArray *cComponents=[self findColors:[NSString stringWithFormat:@"%f,%f,%f,%f",red,green,blue,alpha]];
38 |
39 |
40 |
41 | MIMColorClass *colorObject=[[MIMColorClass alloc]init];
42 | colorObject.red=[[cComponents objectAtIndex:0] floatValue];
43 | colorObject.green=[[cComponents objectAtIndex:1] floatValue];
44 | colorObject.blue=[[cComponents objectAtIndex:2] floatValue];
45 | colorObject.alpha=[[cComponents objectAtIndex:3] floatValue];
46 |
47 |
48 | return colorObject;
49 | }
50 |
51 |
52 | /****************************************************************************************/
53 | //MIM CHART LIB COLORS MADE EASY !
54 | //
55 | //Now User can give the colors in following format
56 | //1.@"0.123,0.345,0.456" : Opt to skip the value of alpha, by default alpha =1.
57 | //
58 | //
59 | //2.@"0.123,0.345,0.456,0.4" : Opt to give the value of alpha and its != 1.
60 | //
61 | //
62 | //
63 | //Values can be between 0 to 255.User dont have to user calculator to find float value, we will calculate it
64 | //
65 | //3.@"235,18,255" : Opt to skip alpha (values can be anything between 0 and 255)
66 | //
67 | //
68 | //4.@"235,18,255,255" : Opt to add alpha (Its 255, it can be anything between 0 and 255)
69 | //
70 | //
71 | //5.@"0.1,145,234" : Opt to give some values in range(0,255), others in (0,1) !
72 | //
73 | //
74 | //6.@"0.1,,234,255" : Skips values but dont skip the commas ! skipped values will be given default value of 0.0
75 | //Here Green component will be given value 0.0
76 | /****************************************************************************************/
77 |
78 |
79 | +(MIMColorClass *)colorWithComponent:(NSString*)colorString
80 | {
81 |
82 | //If there are only 3 values user gave only
83 | NSArray *cComponents=[self findColors:colorString];
84 |
85 |
86 |
87 | MIMColorClass *colorObject=[[MIMColorClass alloc]init];
88 | colorObject.red=[[cComponents objectAtIndex:0] floatValue];
89 | colorObject.green=[[cComponents objectAtIndex:1] floatValue];
90 | colorObject.blue=[[cComponents objectAtIndex:2] floatValue];
91 | colorObject.alpha=[[cComponents objectAtIndex:3] floatValue];
92 |
93 | return colorObject;
94 |
95 | }
96 |
97 | +(NSArray *)findColors:(NSString *)colorString
98 | {
99 | //NSLog(@"colorString=%@",colorString);
100 |
101 |
102 | NSArray *array = [colorString componentsSeparatedByString:@","];
103 |
104 | int count=[array count];
105 | NSAssert((count <= 4)&&(count >= 3),@"colorString components count should be in range(3,5)");
106 |
107 |
108 | float red=0.0;
109 | float green=0.0;
110 | float blue=0.0;
111 |
112 |
113 | float a=[[array objectAtIndex:0] floatValue];
114 |
115 |
116 | NSAssert((a <= 255)&&(a >= 0),@"Red Component should be in range(0,255)");
117 |
118 | if(a>1)
119 | a=a/255.0;
120 | red=a;
121 |
122 |
123 |
124 |
125 | a=[[array objectAtIndex:1] floatValue];
126 |
127 | NSAssert((a <= 255)&&(a >= 0),@"Green Component should be in range(0,255)");
128 |
129 | if(a>1)
130 | a=a/255.0;
131 | green=a;
132 |
133 |
134 |
135 | a=[[array objectAtIndex:2] floatValue];
136 |
137 | NSAssert((a <= 255)&&(a >= 0),@"Blue Component should be in range(0,255)");
138 |
139 | if(a>1)
140 | a=a/255.0;
141 | blue=a;
142 |
143 |
144 |
145 |
146 |
147 | float alpha=1.0;
148 |
149 | //User has opted to include the alpha value
150 | if([array count]==4)
151 | {
152 | a=[[array objectAtIndex:3] floatValue];
153 |
154 | NSAssert((a <= 255)&&(a >= 0),@"Alpha Component should be in range(0,255)");
155 |
156 | if(a>1)
157 | a=a/255.0;
158 |
159 | alpha=a;
160 | }
161 |
162 |
163 | return [NSArray arrayWithObjects:[NSNumber numberWithFloat:red],[NSNumber numberWithFloat:green],[NSNumber numberWithFloat:blue],[NSNumber numberWithFloat:alpha], nil];
164 |
165 | }
166 |
167 | @end
168 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/FragmentedPieChart/DoughtNutFragmentTitle.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // DoughtNutFragmentTitle.h
20 | // MIM2D Library
21 | //
22 | // Created by Reetu Raj on 01/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import
28 |
29 | @interface DoughtNutFragmentTitle : UIView {
30 |
31 | NSString *title;
32 | float rotationAngle;
33 | }
34 |
35 | @property(nonatomic,retain)NSString *title;
36 | @property(nonatomic,assign)float rotationAngle;
37 |
38 | -(void)draw;
39 | @end
40 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/FragmentedPieChart/FragmentedDoughNutDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // FragmentedDoughNutDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/30/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #ifndef MIMChartLib_FragmentedDoughNutDelegate_h
10 | #define MIMChartLib_FragmentedDoughNutDelegate_h
11 | @protocol FragmentedDoughNutDelegate
12 |
13 | @optional
14 | -(float)innerRadiusForDoughNut:(id)doughnut;
15 | -(float)outerRadiusForDoughNut:(id)doughnut;
16 | -(NSArray *)valuesForDoughNut:(id)doughnut;
17 | -(NSArray *)titlesForDoughNut:(id)doughnut;
18 | -(NSArray *)colorsForDoughNut:(id)doughnut;
19 | @end
20 |
21 |
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/FragmentedPieChart/MIMFragmentedDoughNut.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // 2DFragmentedDoughNut.h
20 | // MIM2D Library
21 | //
22 | // Created by Reetu Raj on 01/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "DoughtNutFragmentTitle.h"
28 | #import "MIMColor.h"
29 | #import "FragmentedDoughNutDelegate.h"
30 | #import "Constant.h"
31 |
32 | @interface MIMFragmentedDoughNut : UIView {
33 |
34 |
35 | NSMutableArray *colorArray;
36 |
37 | TINTCOLOR tint;
38 | CGPoint center;
39 | BOOL isShadow;
40 |
41 | iddelegate;
42 |
43 | @private
44 |
45 |
46 | float innerRadius;
47 | float outerRadius;
48 | }
49 | @property(nonatomic,retain)iddelegate;
50 |
51 | @property(nonatomic,assign) TINTCOLOR tint;
52 | @property(nonatomic,assign) CGPoint center;
53 | @property(nonatomic,assign) BOOL isShadow;
54 |
55 | -(void)drawDoughNut;
56 | -(void)drawTitles:(CGFloat)val WithRotation:(CGFloat)angle WithOffset:(CGFloat)offset WithTitle:(NSString *)titleVal;
57 | @end
58 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/GaugeMeter/GaugeGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // GaugeGraph.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/3/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 |
12 | @interface GaugeGraph : UIView
13 | {
14 | MIMColorClass *backgroundcolor;
15 | NSArray *gaugeValueArray; // range (0-30) red , range(30-70) blue etc
16 | float currentValue;
17 | NSArray *properties;//display numbers of seperators, seperator color, main circle color.
18 |
19 |
20 | }
21 | @property(nonatomic,retain)MIMColorClass *backgroundcolor;
22 | @property(nonatomic,retain)NSArray *gaugeValueArray; // range (0-30) red , range(30-70) blue etc
23 | @property(nonatomic,assign)float currentValue;
24 | @property(nonatomic,retain)NSArray *properties;//display numbers of seperators, seperator color, main circle color.
25 |
26 | -(void)drawGaugeGraph;
27 | @end
28 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Images/monotone_location_pin_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Images/monotone_location_pin_marker.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Images/monotone_position_marker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Images/monotone_position_marker.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/LineGraphDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // LineGraphDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/30/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 | #import "MIMColorClass.h"
9 |
10 | #ifndef MIMChartLib_LineGraphDelegate_h
11 | #define MIMChartLib_LineGraphDelegate_h
12 |
13 | @protocol LineGraphDelegate
14 |
15 | @optional
16 |
17 | -(NSArray *)valuesForGraph:(id)graph; /*This values are plot on Y-Axis*/
18 | -(NSArray *)valuesForXAxis:(id)graph;/*This values are plot on X-Axis*/
19 | -(NSArray *)titlesForXAxis:(id)graph;/*These titles are displayed on X-Axis*/
20 | -(NSArray *)titlesForYAxis:(id)graph;/*If given,These titles are displayed on Y-Axis*/
21 |
22 |
23 | -(NSDictionary *)horizontalLinesProperties:(id)graph; //hide,color,gap,width
24 | -(NSDictionary *)verticalLinesProperties:(id)graph;
25 | -(NSDictionary *)xAxisProperties:(id)graph;//hide,color,width,linewidth,style
26 | -(NSDictionary *)yAxisProperties:(id)graph;//hide,color,width,linewidth,style
27 |
28 | -(NSDictionary *)chartTitleProperties:(id)graph;//hide,color,frame,font
29 | -(NSArray *)ColorsForLineChart:(id)graph;
30 | -(NSArray *)AnchorProperties:(id)graph;
31 | //NSArray of NSDictionary with keys style,radius,shadowRadius,touchenabled,color,bordercolor,border width.
32 |
33 | -(NSDictionary *)infoWindowProperties:(id)graph; // Font name, font size , single line/multiple line
34 | -(NSArray *)lineGraphProperties:(id)graph;
35 | /*Array contains one dictionary for each line graph;
36 | //Each Dictionary can have following values:
37 | delay
38 | animationDuration
39 | line style
40 | glow effect
41 | glow radius
42 | */
43 |
44 |
45 |
46 | -(UIView *)backgroundViewForLineChart:(id)graph;
47 | @end
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/LineInfoBox.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // LineInfoBox.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 15/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 |
28 |
29 | @interface LineInfoBox : UIView {
30 |
31 | NSMutableArray *colorArray;
32 | NSArray *lineArray;
33 | }
34 | @property(nonatomic,retain) NSArray *lineArray;
35 | -(void)createColorArray;
36 | @end
37 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/LineInfoBox.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // LineInfoBox.m
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 15/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import "LineInfoBox.h"
27 |
28 |
29 | @implementation LineInfoBox
30 | @synthesize lineArray;
31 |
32 | - (id)initWithFrame:(CGRect)frame
33 | {
34 | self = [super initWithFrame:frame];
35 | if (self) {
36 | // Initialization code
37 | [self createColorArray];
38 | }
39 | return self;
40 | }
41 |
42 | -(void)createColorArray
43 | {
44 | colorArray=[[NSMutableArray alloc]init];
45 |
46 | [colorArray addObject:[UIColor redColor]];
47 | [colorArray addObject:[UIColor greenColor]];
48 | [colorArray addObject:[UIColor blueColor]];
49 | [colorArray addObject:[UIColor yellowColor]];
50 | [colorArray addObject:[UIColor magentaColor]];
51 | [colorArray addObject:[UIColor darkGrayColor]];
52 | [colorArray addObject:[UIColor orangeColor]];
53 | }
54 |
55 |
56 |
57 | // Only override drawRect: if you perform custom drawing.
58 | // An empty implementation adversely affects performance during animation.
59 | - (void)drawRect:(CGRect)rect
60 | {
61 | CGContextRef context = UIGraphicsGetCurrentContext();
62 | CGContextSetBlendMode(context,kCGBlendModeNormal);
63 |
64 |
65 | // Drawing code
66 | for (int i=0; i<[lineArray count]; i++) {
67 |
68 | //Draw the line
69 | UIColor *lineColor=[colorArray objectAtIndex:i];
70 | CGContextSetFillColorWithColor(context, lineColor.CGColor);
71 | CGContextAddRect(context, CGRectMake(5, 30* i + 10, 20, 10));
72 | CGContextFillPath(context);
73 |
74 |
75 | //Stick the Label
76 | UILabel *label=[[UILabel alloc]initWithFrame:CGRectMake(30, 30* i, 200, 30)];
77 | [label setText:[lineArray objectAtIndex:i]];
78 | [label setBackgroundColor:[UIColor blackColor]];
79 | [label setFont:[UIFont fontWithName:@"Helvetica" size:12]];
80 | [label setTextColor:[UIColor whiteColor]];
81 | [self addSubview:label];
82 | }
83 |
84 | }
85 |
86 |
87 | - (void)dealloc
88 | {
89 | ////[super dealloc];
90 | }
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/LineScrollView.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | // LineScrollView.h
21 | // MIMChartLib
22 | //
23 | // Created by Reetu Raj on 5/24/12.
24 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
25 | //
26 |
27 | #import
28 | #import "MIMColorClass.h"
29 |
30 | @interface LineScrollView : UIScrollView
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/LineScrollView.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | // LineScrollView.m
21 | // MIMChartLib
22 | //
23 | // Created by Reetu Raj on 5/24/12.
24 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
25 | //
26 |
27 | #import "LineScrollView.h"
28 |
29 | @implementation LineScrollView
30 |
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/MIMLineGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMLineGraph.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/3/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 | /*
9 | Includes Single Lines, Multiple Lines, Negative Line with range on Y-Axis auto-numbering(doesnt start from 0 in all cases).
10 | Really Long Line graph is also possible now.
11 | */
12 | #import
13 | #import "LineGraphDelegate.h"
14 | #import "Constant.h"
15 | #import "MultiLineLongGraph.h"
16 | #import "MIMMargin.h"
17 |
18 |
19 | @interface MIMLineGraph : UIView
20 | {
21 | iddelegate;
22 |
23 | MIMColorClass *mbackgroundColor;
24 | NSArray *lineColorArray;
25 |
26 | NSMutableArray *anchorTypeArray;
27 | XTitleStyle xTitleStyle;
28 |
29 | BOOL minimumLabelOnYIsZero;
30 | BOOL animateLine;
31 | BOOL hideInfoWindow;
32 |
33 | MIMMargin margin;
34 | UILabel *titleLabel;
35 | }
36 |
37 | @property(nonatomic,retain)iddelegate;
38 | @property(nonatomic,retain)MIMColorClass *mbackgroundColor;
39 | @property(nonatomic,retain)NSArray *lineColorArray;
40 | @property(nonatomic,retain)NSMutableArray *anchorTypeArray;
41 | @property(nonatomic,assign)XTitleStyle xTitleStyle;
42 | @property(nonatomic,assign)BOOL minimumLabelOnYIsZero;
43 | @property(nonatomic,assign)BOOL animateLine;
44 | @property(nonatomic,assign)BOOL hideInfoWindow;
45 | @property(nonatomic,assign)MIMMargin margin;
46 | @property(nonatomic,retain)UILabel *titleLabel;
47 |
48 | -(void)drawMIMLineGraph;
49 | @end
50 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/MultiLineLongGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // MultiLineLongGraph.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/25/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 |
12 |
13 | @interface MultiLineLongGraph : UIView
14 | {
15 | float gridHeight;
16 | float scalingX;
17 | float scalingY;
18 | BOOL xIsString;
19 | float minimumOnY;
20 | float barOffset;
21 |
22 |
23 | NSArray *lineColorArray;
24 | NSArray *lineBezierPath;
25 | NSArray *aPropertiesArray;
26 | NSArray *anchorTypeArray;
27 |
28 |
29 | NSMutableArray *xValElements;
30 | NSMutableArray *yValElements;
31 | float leftMargin;
32 | float bottomMargin;
33 | float xAxisHeight;
34 | float xOffset;
35 |
36 | }
37 |
38 |
39 | @property(nonatomic,assign)float gridHeight;
40 | @property(nonatomic,assign)float scalingX;
41 | @property(nonatomic,assign)float scalingY;
42 | @property(nonatomic,assign)BOOL xIsString;
43 | @property(nonatomic,assign)float minimumOnY;
44 | @property(nonatomic,assign)float barOffset;
45 | @property(nonatomic,assign)float xOffset;
46 |
47 | @property(nonatomic,retain)NSArray *lineColorArray;
48 | @property(nonatomic,retain)NSArray *lineBezierPath;
49 |
50 | @property(nonatomic,retain)NSArray *aPropertiesArray;
51 | @property(nonatomic,retain)NSArray *anchorTypeArray;
52 |
53 |
54 | @property(nonatomic,retain)NSMutableArray *xValElements;
55 | @property(nonatomic,retain)NSMutableArray *yValElements;
56 | @property(nonatomic,assign)float leftMargin;
57 | @property(nonatomic,assign)float bottomMargin;
58 | @property(nonatomic,assign)float xAxisHeight;
59 | @end
60 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/lines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Line Graph/lines.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Line Graph/lines1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Line Graph/lines1.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BasicPie.h:
--------------------------------------------------------------------------------
1 | /*
2 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
3 | and associated documentation files (the “Software”), to deal in the Software without
4 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
5 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
6 | the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or
9 | substantial portions of the Software.
10 |
11 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
12 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
14 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16 | */
17 |
18 | //
19 | // BasicPie.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 4/18/12.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import "MIMColorClass.h"
28 | #import "MIMColor.h"
29 | #import "DefaultPopOverForPieChart.h"
30 | #import "Constant.h"
31 | #import
32 |
33 | @interface BasicPie : UIView
34 | {
35 | CGPoint center;
36 | float radius;
37 | float borderWidth;
38 | MIMColorClass *borderColor;
39 | BOOL glossEffect;
40 | TINTCOLOR tint;
41 | NSMutableArray *valueArray_;
42 | NSMutableArray *gradientArray_;
43 | NSMutableArray *colorArray_;
44 | NSMutableArray *angleArrays_;
45 | BOOL gradientActive;
46 | BOOL animation;
47 | BOOL userTouchAllowed;
48 | BOOL enableDoubleTap;//This is needed when user wants detail popup as well as info box
49 | BOOL enableShowDetailBox;
50 | BOOL enableBubbleBox;//Display bubbles
51 | BOOL showAllBubbles;
52 |
53 | @private
54 | float lastRotation_;
55 | float netRotation_;
56 | UITapGestureRecognizer *tapGesture;
57 | UITapGestureRecognizer *dtapGesture;
58 | UIRotationGestureRecognizer *rotationGesture;
59 | float maxPForS1;
60 | float alpha;
61 | NSTimer *timer;
62 | int indexTapped;
63 | int afterTappingWhichDirectionToRotate;
64 | float Msum;
65 | }
66 |
67 | @property(nonatomic,assign)CGPoint center;
68 | @property(nonatomic,assign)float radius;
69 | @property(nonatomic,assign)float borderWidth;
70 | @property(nonatomic,retain)MIMColorClass *borderColor;
71 | @property(nonatomic,assign)BOOL glossEffect;
72 | @property(nonatomic,assign)TINTCOLOR tint;
73 | @property(nonatomic,retain)NSMutableArray *valueArray_;
74 | @property(nonatomic,retain)NSMutableArray *gradientArray_;
75 | @property(nonatomic,retain)NSMutableArray *colorArray_;
76 | @property(nonatomic,retain)NSMutableArray *angleArrays_;
77 | @property(nonatomic,assign)BOOL gradientActive;
78 | @property(nonatomic,assign)BOOL animation;
79 | @property(nonatomic,assign)BOOL userTouchAllowed;
80 | @property(nonatomic,assign)BOOL enableDoubleTap;
81 | @property(nonatomic,assign)BOOL enableShowDetailBox;
82 | @property(nonatomic,assign)int afterTappingWhichDirectionToRotate;
83 | @property(nonatomic,assign)BOOL enableBubbleBox;
84 | @property (nonatomic,assign)BOOL showAllBubbles;
85 |
86 | -(void)initPie;
87 |
88 | -(void)setUserTouchEnabled:(BOOL)enabled;
89 | -(void)refreshPie;
90 |
91 | //info box methods
92 | -(void)rotatePieToIndex:(int)index whichDirection:(int)direction;
93 |
94 | //Bubbles
95 | -(int)getQuadrantAtIndex:(int)index;
96 | -(CGPoint)getPointAtIndex:(int)index;
97 | -(float)getSum;
98 | @end
99 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BasicPieChartSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/BasicPieChartSample.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BevelPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // BevelPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/15/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "MIMColor.h"
12 | #import "Constant.h"
13 | #import "MIMPieChart.h"
14 | #import "MIMColorClass.h"
15 | #import "MIMPieChartDelegate.h"
16 |
17 | @interface BevelPieChart : UIView
18 | {
19 | MIMPieChart *pieChart;
20 | id delegate;
21 | TINTCOLOR tint;
22 | BOOL drawBorders;
23 |
24 | //This lets user touch the pieChart, rotate it.
25 | BOOL userTouchAllowed;
26 |
27 | @private
28 | float maxPForS1;
29 | int selectedPie;
30 | BOOL returnBackToOriginalLocation;
31 | BOOL gradientActive;
32 | MIMColorClass *bgColor;
33 | }
34 | @property (nonatomic,retain) id delegate;
35 | @property (nonatomic,assign)TINTCOLOR tint;
36 | @property (nonatomic,assign)BOOL drawBorders;
37 |
38 | @property (nonatomic,assign)BOOL dropShadowOnRoad;
39 | @property (nonatomic,assign)BOOL userTouchAllowed;
40 |
41 |
42 |
43 | -(void)drawPieChart;
44 | @end
45 |
46 |
47 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BevelPieChart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/BevelPieChart.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BiTransPieCHartSample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/BiTransPieCHartSample.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BiTransPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // BiTransPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMPieChart.h"
11 | #import "MIMPieChartDelegate.h"
12 | #import "MIMColorClass.h"
13 | #import "MIMColor.h"
14 |
15 |
16 | @interface BiTransPieChart : UIView
17 | {
18 |
19 | MIMPieChart *pieChart;
20 | id delegate;
21 |
22 |
23 | float innerRadius;
24 | float outerRadius;
25 | float borderWidth;
26 | float percentValue;
27 | MIMColorClass *mcolor;
28 | MIMColorClass *bgColor;
29 | BOOL glossEffect;
30 | //TINTCOLOR tint;
31 | UIImage *centerIcon;
32 |
33 |
34 | BOOL dropShadowOnRoad;
35 |
36 |
37 | //This lets user touch the pieChart, rotate it.
38 | BOOL userTouchAllowed;
39 |
40 | @private
41 | float maxPForS1;
42 | BOOL gradientActive;
43 |
44 | }
45 | @property (nonatomic,retain) id delegate;
46 | @property (nonatomic,assign)float innerRadius;
47 | @property (nonatomic,assign)float outerRadius;
48 | @property (nonatomic,assign)float borderWidth;
49 | @property (nonatomic,assign)float percentValue;
50 | @property (nonatomic,retain)MIMColorClass *mcolor;
51 | @property (nonatomic,assign)BOOL glossEffect;
52 | //@property (nonatomic,assign)TINTCOLOR tint;
53 | @property (nonatomic,retain)UIImage *centerIcon;
54 | @property (nonatomic,assign)BOOL userTouchAllowed;
55 | -(void)drawPieChart;
56 | @end
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/BiTransPieChart.m:
--------------------------------------------------------------------------------
1 | //
2 | // BiTransPieChart.m
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "BiTransPieChart.h"
10 |
11 |
12 |
13 | @interface BiTransPieChart()
14 | -(void)initAndWarnings;
15 | -(void)findCenter;
16 | @end
17 |
18 | @implementation BiTransPieChart
19 |
20 | @synthesize innerRadius;
21 | @synthesize outerRadius;
22 | @synthesize borderWidth;
23 | @synthesize mcolor;
24 | @synthesize glossEffect;
25 | @synthesize centerIcon;
26 | @synthesize percentValue;
27 | @synthesize delegate;
28 | @synthesize userTouchAllowed;
29 |
30 | - (id)initWithFrame:(CGRect)frame
31 | {
32 | self = [super initWithFrame:frame];
33 | if (self) {
34 | // Initialization code
35 | }
36 | return self;
37 | }
38 |
39 |
40 | // Only override drawRect: if you perform custom drawing.
41 | // An empty implementation adversely affects performance during animation.
42 | - (void)drawRect:(CGRect)rect
43 | {
44 |
45 |
46 | CGContextRef context = UIGraphicsGetCurrentContext();
47 | UIGraphicsPushContext(context);
48 | CGContextSetAllowsAntialiasing(context, true);
49 | CGContextSetShouldAntialias(context, true);
50 |
51 |
52 | //Draw the Transparent part
53 | UIColor *color=[UIColor colorWithRed:mcolor.red green:mcolor.green blue:mcolor.blue alpha:0.5];
54 | float mypercentValue=(6.28*percentValue)/100;
55 | CGContextSaveGState(context);
56 | CGContextMoveToPoint(context, pieChart.centerX_, pieChart.centerY_);
57 | CGContextAddArc(context, pieChart.centerX_, pieChart.centerY_, outerRadius-1,4.71,4.71+mypercentValue , 0);
58 | CGContextClosePath(context);
59 | CGContextSetFillColorWithColor(context, color.CGColor);
60 | CGContextFillPath(context);
61 | CGContextRestoreGState(context);
62 |
63 |
64 |
65 | // Draw center circle
66 | color=[UIColor colorWithRed:mcolor.red green:mcolor.green blue:mcolor.blue alpha:mcolor.alpha];
67 | CGContextSaveGState(context);
68 | CGContextMoveToPoint(context, pieChart.centerX_, pieChart.centerY_);
69 | CGContextAddArc(context, pieChart.centerX_, pieChart.centerY_, innerRadius,0,6.28, 0);
70 | CGContextClosePath(context);
71 | CGContextSetFillColorWithColor(context, color.CGColor);
72 | CGContextFillPath(context);
73 | CGContextRestoreGState(context);
74 |
75 | //Outer circle
76 | CGContextSaveGState(context);
77 | CGContextSetStrokeColorWithColor(context, color.CGColor);
78 | if(!borderWidth)
79 | borderWidth=outerRadius/18.0;
80 | CGContextSetLineWidth(context, borderWidth);
81 | CGContextAddEllipseInRect(context, CGRectMake(pieChart.centerX_-outerRadius, pieChart.centerY_-outerRadius, 2*outerRadius, 2*outerRadius));
82 | CGContextStrokePath(context);
83 | CGContextRestoreGState(context);
84 |
85 |
86 |
87 | //Set Image
88 | if(centerIcon)
89 | {
90 | UIImageView *iView=[[UIImageView alloc]initWithImage:centerIcon];
91 | [iView setCenter:CGPointMake(pieChart.centerX_, pieChart.centerY_)];
92 | [self addSubview:iView];
93 | }
94 |
95 | }
96 |
97 | -(void)drawPieChart
98 | {
99 | [self initAndWarnings];
100 | [self findCenter];
101 | [self setNeedsDisplay];
102 | }
103 |
104 | /****************************************************************************/
105 | //
106 | // This methods inits all the basic variables required to create a piechart
107 | // It fetches most of the values from delegate methods defined in
108 | // implementation class (BiTransPieChartTestClass.m)
109 | //
110 | //
111 | /*****************************************************************************/
112 |
113 |
114 |
115 | -(void)initAndWarnings
116 | {
117 |
118 | pieChart=[[MIMPieChart alloc]init];
119 |
120 |
121 |
122 | if([delegate respondsToSelector:@selector(colorForBackground:)])
123 | {
124 | bgColor=[delegate colorForBackground:self];
125 |
126 | //SET BACKGROUND COLOR
127 | if(bgColor==nil)
128 | [self setBackgroundColor:[UIColor colorWithRed:0.7 green:0.7 blue:0.7 alpha:1.0]];
129 | else
130 | [self setBackgroundColor:[UIColor colorWithRed:bgColor.red green:bgColor.green blue:bgColor.blue alpha:bgColor.alpha]];
131 |
132 | }
133 | else
134 | {
135 | //SET BACKGROUND COLOR
136 | [self setBackgroundColor:[UIColor colorWithRed:0.7 green:0.7 blue:0.7 alpha:1.0]];
137 |
138 | }
139 |
140 |
141 | }
142 |
143 |
144 | -(void)findCenter
145 | {
146 | //Find the angle of the touchPoint.
147 | //Draw the background with the gray Gradient
148 | float viewHeight=self.frame.size.height;
149 | float viewWidth=self.frame.size.width;
150 |
151 | pieChart.centerX_=viewWidth/2;
152 | pieChart.centerY_=viewHeight/2;
153 |
154 | }
155 |
156 |
157 | @end
158 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/DefaultInfoBox.h:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultInfoBox.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMColorClass.h"
11 |
12 |
13 | @interface DefaultInfoBox : UIView
14 | {
15 |
16 | //User should be able to define the font properties
17 | UIFont *fontName;
18 | MIMColorClass *fontColor;
19 | BOOL shadowBehindBoxes;
20 | BOOL infoBoxSmoothenCorners;
21 |
22 | @private
23 | UIScrollView *infoScrollView;
24 |
25 | }
26 |
27 | @property (nonatomic,retain)UIFont *fontName;
28 | @property (nonatomic,retain)MIMColorClass *fontColor;
29 | @property (nonatomic,assign)BOOL shadowBehindBoxes;
30 | @property (nonatomic,assign)BOOL infoBoxSmoothenCorners;
31 |
32 | -(void)initInfoBoxWithTitles:(NSArray *)titles withSquareColor:(NSArray *)sqColor;
33 | @end
34 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/DefaultInfoBox.m:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultInfoBox.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "DefaultInfoBox.h"
10 | #import
11 |
12 | @implementation DefaultInfoBox
13 | @synthesize fontName;
14 | @synthesize fontColor;
15 | @synthesize shadowBehindBoxes;
16 | @synthesize infoBoxSmoothenCorners;
17 |
18 | - (id)initWithFrame:(CGRect)frame
19 | {
20 | self = [super initWithFrame:frame];
21 | if (self) {
22 | // Initialization code
23 |
24 | [self setBackgroundColor:[UIColor clearColor]];
25 | fontName=[UIFont fontWithName:@"Helvetica" size:12];
26 | fontColor=[MIMColorClass colorWithRed:0 Green:0 Blue:0 Alpha:1];
27 | }
28 | return self;
29 | }
30 |
31 |
32 | -(void)initInfoBoxWithTitles:(NSArray *)titles withSquareColor:(NSArray *)sqColor //If titles include % value, show it.
33 | {
34 | float defaultSize=20;
35 |
36 | infoScrollView=[[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame))];
37 | infoScrollView.tag=836913;
38 | [infoScrollView setBackgroundColor:[UIColor clearColor]];
39 |
40 | for (int i=0; i<[titles count]; i++)
41 | {
42 | UILabel *titleSQ=[[UILabel alloc]initWithFrame:CGRectMake(5, i*defaultSize+5,10, 10)];
43 | MIMColorClass *scolor=[sqColor objectAtIndex:i];
44 | [titleSQ setBackgroundColor:[UIColor colorWithRed:scolor.red green:scolor.green blue:scolor.blue alpha:scolor.alpha]];
45 |
46 |
47 | //Its not working right for some reason.
48 | if(shadowBehindBoxes)
49 | {
50 | [titleSQ.layer setShadowRadius:5.0];
51 | [titleSQ.layer setShadowColor:[UIColor redColor].CGColor];
52 | [titleSQ.layer setShadowOffset:CGSizeMake(3, 0)];
53 | [titleSQ.layer setShadowOpacity:0.5];
54 |
55 | }
56 |
57 | if(infoBoxSmoothenCorners)
58 | titleSQ.layer.cornerRadius=3.0;
59 |
60 |
61 | [infoScrollView addSubview:titleSQ];
62 |
63 |
64 | UILabel *titleLabel=[[UILabel alloc]initWithFrame:CGRectMake(20, i*defaultSize, CGRectGetWidth(self.frame)-25, defaultSize)];
65 |
66 |
67 | [titleLabel setBackgroundColor:[UIColor clearColor]];
68 | [titleLabel setFont:fontName];
69 | [titleLabel setTextColor:[UIColor colorWithRed:scolor.red green:scolor.green blue:scolor.blue alpha:scolor.alpha]];
70 | [titleLabel setText:[titles objectAtIndex:i]];
71 |
72 |
73 | [infoScrollView addSubview:titleLabel];
74 |
75 |
76 | }
77 |
78 | [self addSubview:infoScrollView];
79 | [infoScrollView setContentSize:CGSizeMake(CGRectGetWidth(self.frame), 30*[titles count])];
80 |
81 |
82 | if(30*[titles count]>CGRectGetHeight(infoScrollView.frame))
83 | {
84 |
85 | [self performSelector:@selector(showScrollBar) withObject:nil afterDelay:0.5];
86 | }
87 |
88 | }
89 |
90 | -(void)showScrollBar
91 | {
92 | [infoScrollView setContentOffset:CGPointMake(0,-0.05) animated:YES];
93 | [infoScrollView flashScrollIndicators];
94 | }
95 |
96 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView
97 | {
98 | //Fading Effect Implementation ??
99 | }
100 |
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/DefaultPopOverForPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultPopOverForPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/17/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DefaultPopOverForPieChart : UIViewController
12 | {
13 | NSString *ptitle;
14 | NSString *icon;
15 | NSString *summary;
16 | NSString *detail;
17 |
18 |
19 | //Title
20 | @private
21 | UIImageView *iconImg;
22 | UILabel *titleLabelBg;
23 | UILabel *titleLabel;
24 | UILabel *descriptionLabel;
25 |
26 |
27 | }
28 | @property(nonatomic,retain)NSString *ptitle;
29 | @property(nonatomic,retain)NSString *icon;
30 | @property(nonatomic,retain)NSString *summary;
31 | @property(nonatomic,retain)NSString *detail;
32 |
33 |
34 |
35 | -(void)createTheView;
36 | @end
37 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/DefaultPopOverForPieChart.m:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultPopOverForPieChart.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/17/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "DefaultPopOverForPieChart.h"
10 |
11 | @implementation DefaultPopOverForPieChart
12 | @synthesize ptitle;
13 | @synthesize icon;
14 | @synthesize summary;
15 | @synthesize detail;
16 |
17 |
18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
19 | {
20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
21 | if (self) {
22 | // Custom initialization
23 | }
24 | return self;
25 | }
26 |
27 | - (void)didReceiveMemoryWarning
28 | {
29 | // Releases the view if it doesn't have a superview.
30 | [super didReceiveMemoryWarning];
31 |
32 | // Release any cached data, images, etc that aren't in use.
33 | }
34 |
35 | #pragma mark - View lifecycle
36 |
37 | /*
38 | // Implement loadView to create a view hierarchy programmatically, without using a nib.
39 | - (void)loadView
40 | {
41 | }
42 | */
43 |
44 |
45 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
46 | - (void)viewDidLoad
47 | {
48 | self.contentSizeForViewInPopover=CGSizeMake(200, 150);
49 |
50 | [self.view setBackgroundColor:[UIColor whiteColor]];
51 |
52 | iconImg=[[UIImageView alloc]initWithFrame:CGRectMake(45, 2, 160, 40)];
53 | titleLabel=[[UILabel alloc]initWithFrame:CGRectMake(45, 2, 160, 40)];
54 | titleLabelBg=[[UILabel alloc]initWithFrame:CGRectMake(3, 40, 200-6, 1)];
55 | descriptionLabel=[[UILabel alloc]initWithFrame:CGRectMake(5, 42, 190, 110)];
56 |
57 |
58 |
59 |
60 | [titleLabelBg setBackgroundColor:[UIColor lightGrayColor]];
61 | [titleLabelBg setAlpha:0.5];
62 | [self.view addSubview:titleLabelBg];
63 |
64 | [titleLabel setText:ptitle];
65 | [titleLabel setTextColor:[UIColor blackColor]];
66 | titleLabel.numberOfLines=2;
67 | titleLabel.lineBreakMode=UILineBreakModeWordWrap;
68 | [titleLabel setBackgroundColor:[UIColor clearColor]];
69 | [titleLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:12]];
70 | [self.view addSubview:titleLabel];
71 |
72 |
73 | [descriptionLabel setText:summary];
74 | [descriptionLabel setTextColor:[UIColor blackColor]];
75 | descriptionLabel.numberOfLines=5;
76 | descriptionLabel.baselineAdjustment=TRUE;
77 | descriptionLabel.lineBreakMode=UILineBreakModeWordWrap;
78 | [descriptionLabel setBackgroundColor:[UIColor clearColor]];
79 | [descriptionLabel setFont:[UIFont fontWithName:@"Helvetica" size:12]];
80 | [self.view addSubview:descriptionLabel];
81 |
82 |
83 | [super viewDidLoad];
84 | }
85 | #pragma mark - CLASS METHODS
86 |
87 | -(void)createTheView
88 | {
89 |
90 |
91 |
92 |
93 | if(![icon isEqualToString:@""])
94 | {
95 | [iconImg setHidden:NO];
96 | UIImage *im=[UIImage imageNamed:icon];
97 | [iconImg setImage:im];
98 | iconImg.frame=CGRectMake(1, 1, im.size.width, im.size.height);
99 | [self.view addSubview:iconImg];
100 |
101 | titleLabel.frame=CGRectMake(im.size.width+5, 2, 160, 40);
102 | titleLabelBg.frame=CGRectMake(3, im.size.height+5, 200-6, 1);
103 | descriptionLabel.frame=CGRectMake(5, im.size.height+5, 190, 110);
104 |
105 | }
106 | else
107 | {
108 | [iconImg setHidden:YES];
109 | titleLabel.frame=CGRectMake(45, 2, 160, 40);
110 | titleLabelBg.frame=CGRectMake(3, 40, 200-6, 1);
111 | descriptionLabel.frame=CGRectMake(5, 42, 190, 110);
112 | }
113 |
114 |
115 | [titleLabel setText:ptitle];
116 |
117 |
118 |
119 |
120 | [descriptionLabel setText:summary];
121 |
122 |
123 | }
124 |
125 |
126 | - (void)viewDidUnload
127 | {
128 | [super viewDidUnload];
129 | // Release any retained subviews of the main view.
130 | // e.g. self.myOutlet = nil;
131 | }
132 |
133 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
134 | {
135 | // Return YES for supported orientations
136 | return YES;
137 | }
138 |
139 | @end
140 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/DetailPopOverStyle2.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailPopOverStyle2.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/20/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 |
12 | @interface DetailPopOverStyle2 : UIView
13 | {
14 | PIE_DETAIL_POPUP_TYPE detailPopUpType;
15 | NSTimer *timer;
16 | float alpha;
17 | BOOL roundedCorner;
18 | DIRECTION arrowDirection;
19 |
20 | NSString *ptitle;
21 | NSString *icon;
22 | NSString *summary;
23 | NSString *detail;
24 |
25 |
26 |
27 | @private
28 | UILabel *titleLabelBg;
29 | UILabel *titleLabel;
30 | UIImageView *iconImg;
31 | UILabel *descriptionLabel;
32 | UIImageView *bgView;
33 | CGRect rrect;
34 | CGRect gRect;
35 |
36 | }
37 |
38 | @property(nonatomic,assign)PIE_DETAIL_POPUP_TYPE detailPopUpType;
39 | @property(nonatomic,assign)BOOL roundedCorner;
40 | @property(nonatomic,assign)DIRECTION arrowDirection;
41 |
42 | @property(nonatomic,retain)NSString *ptitle;
43 | @property(nonatomic,retain)NSString *icon;
44 | @property(nonatomic,retain)NSString *summary;
45 | @property(nonatomic,retain)NSString *detail;
46 |
47 | -(void)setTheValues;
48 | -(void)createTheView;
49 |
50 | -(void)StartTimerForShowingText;
51 | -(void)initAlpha;
52 | @end
53 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/InfoBoxStyle1.h:
--------------------------------------------------------------------------------
1 | //
2 | // InfoBoxStyle1.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMColorClass.h"
11 | #import "ScrollViewSubClass.h"
12 | #import "BasicPieChart.h"
13 |
14 | @interface InfoBoxStyle1 : UIView
15 | {
16 | //User should be able to define the font properties
17 | UIFont *fontName;
18 | MIMColorClass *fontColor;
19 | BOOL shadowBehindBoxes;
20 | BOOL infoBoxSmoothenCorners;
21 | float centerOfPie;
22 |
23 | @private
24 | ScrollViewSubClass *infoScrollView;
25 | float contentHeight;
26 |
27 | }
28 |
29 | @property (nonatomic,retain)UIFont *fontName;
30 | @property (nonatomic,retain)MIMColorClass *fontColor;
31 | @property (nonatomic,assign)BOOL shadowBehindBoxes;
32 | @property (nonatomic,assign)BOOL infoBoxSmoothenCorners;
33 | @property (nonatomic,assign)float centerOfPie;
34 | -(void)initInfoBoxWithTitles:(NSArray *)titles withSquareColor:(NSArray *)sqColor;
35 | -(void)LabelTapped:(int)touchedViewTag;
36 | @end
37 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/InfoBoxStyle1.m:
--------------------------------------------------------------------------------
1 | //
2 | // InfoBoxStyle1.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "InfoBoxStyle1.h"
10 | #import
11 |
12 |
13 | @implementation InfoBoxStyle1
14 | @synthesize fontName;
15 | @synthesize fontColor;
16 | @synthesize shadowBehindBoxes;
17 | @synthesize infoBoxSmoothenCorners;
18 | @synthesize centerOfPie;
19 |
20 |
21 | - (id)initWithFrame:(CGRect)frame
22 | {
23 | self = [super initWithFrame:frame];
24 | if (self) {
25 | // Initialization code
26 |
27 | [self setBackgroundColor:[UIColor clearColor]];
28 | fontName=[UIFont fontWithName:@"Helvetica" size:12];
29 | fontColor=[MIMColorClass colorWithRed:0 Green:0 Blue:0 Alpha:1];
30 |
31 | }
32 | return self;
33 | }
34 |
35 |
36 | -(void)initInfoBoxWithTitles:(NSArray *)titles withSquareColor:(NSArray *)sqColor //If titles include % value, show it.
37 | {
38 | float defaultSize =20;
39 |
40 | infoScrollView=[[ScrollViewSubClass alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame))];
41 | infoScrollView.tag=836913;
42 | [infoScrollView setBackgroundColor:[UIColor clearColor]];
43 |
44 | for (int i=0; i<[titles count]; i++)
45 | {
46 | UILabel *titleSQ=[[UILabel alloc]initWithFrame:CGRectMake(5, i*defaultSize+10,10, 10)];
47 | titleSQ.tag=100+i;
48 | MIMColorClass *scolor=[sqColor objectAtIndex:i];
49 | [titleSQ setBackgroundColor:[UIColor colorWithRed:scolor.red green:scolor.green blue:scolor.blue alpha:scolor.alpha]];
50 |
51 |
52 | //Its not working right for some reason.
53 | if(shadowBehindBoxes)
54 | {
55 | [titleSQ.layer setShadowRadius:5.0];
56 | [titleSQ.layer setShadowColor:[UIColor redColor].CGColor];
57 | [titleSQ.layer setShadowOffset:CGSizeMake(3, 0)];
58 | [titleSQ.layer setShadowOpacity:0.5];
59 |
60 | }
61 |
62 | if(infoBoxSmoothenCorners)
63 | titleSQ.layer.cornerRadius=3.0;
64 |
65 |
66 | [infoScrollView addSubview:titleSQ];
67 |
68 |
69 | UILabel *titleLabel=[[UILabel alloc]initWithFrame:CGRectMake(20, i*defaultSize, CGRectGetWidth(self.frame)-25, defaultSize)];
70 | titleLabel.tag=100+i;
71 |
72 | [titleLabel setBackgroundColor:[UIColor clearColor]];
73 | [titleLabel setFont:fontName];
74 | [titleLabel setTextColor:[UIColor colorWithRed:fontColor.red green:fontColor.green blue:fontColor.blue alpha:fontColor.alpha]];
75 | [titleLabel setText:[titles objectAtIndex:i]];
76 | [infoScrollView addSubview:titleLabel];
77 |
78 |
79 |
80 | }
81 |
82 | [self addSubview:infoScrollView];
83 | [infoScrollView setContentSize:CGSizeMake(CGRectGetWidth(self.frame), 30*[titles count])];
84 | contentHeight=30*[titles count];
85 |
86 | if(30*[titles count]>CGRectGetHeight(infoScrollView.frame))
87 | {
88 | [self performSelector:@selector(showScrollBar) withObject:nil afterDelay:0.5];
89 | }
90 |
91 | }
92 |
93 | -(void)showScrollBar
94 | {
95 | [infoScrollView setContentOffset:CGPointMake(0,-0.05) animated:YES];
96 | [infoScrollView flashScrollIndicators];
97 | }
98 |
99 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView
100 | {
101 | //Fading Effect Implementation ??
102 | }
103 |
104 | -(void)LabelTapped:(int)touchedViewTag
105 | {
106 |
107 | NSLog(@"touchedViewTag=%i",touchedViewTag);
108 | float yOffset=(CGRectGetMinY(self.frame)+ 30*touchedViewTag)-self.centerOfPie;
109 | yOffset+=15;
110 | [infoScrollView setContentOffset:CGPointMake(0,yOffset) animated:YES];
111 |
112 | //Call BasicPieChart the superview
113 | //send the index and tell it to rotate the pie
114 | [(BasicPieChart *)self.superview rotatePieToIndex:touchedViewTag whichDirection:1];
115 |
116 | }
117 |
118 | @end
119 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/InfoBoxStyle2.h:
--------------------------------------------------------------------------------
1 | //
2 | // InfoBoxStyle2.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface InfoBoxStyle2 : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/InfoBoxStyle2.m:
--------------------------------------------------------------------------------
1 | //
2 | // InfoBoxStyle2.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/16/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "InfoBoxStyle2.h"
10 |
11 | @implementation InfoBoxStyle2
12 |
13 | - (id)initWithFrame:(CGRect)frame
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | // Initialization code
18 | }
19 | return self;
20 | }
21 |
22 | /*
23 | // Only override drawRect: if you perform custom drawing.
24 | // An empty implementation adversely affects performance during animation.
25 | - (void)drawRect:(CGRect)rect
26 | {
27 | // Drawing code
28 | }
29 | */
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/LayeredPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // LayeredPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface LayeredPieChart : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/LayeredPieChart.m:
--------------------------------------------------------------------------------
1 | //
2 | // LayeredPieChart.m
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "LayeredPieChart.h"
10 |
11 | @implementation LayeredPieChart
12 |
13 | - (id)initWithFrame:(CGRect)frame
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | // Initialization code
18 | }
19 | return self;
20 | }
21 |
22 | /*
23 | // Only override drawRect: if you perform custom drawing.
24 | // An empty implementation adversely affects performance during animation.
25 | - (void)drawRect:(CGRect)rect
26 | {
27 | // Drawing code
28 | }
29 | */
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/LeftTriangleIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/LeftTriangleIcon.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/LeftTriangleIconBlack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/LeftTriangleIconBlack.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/MIMPieChart.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | *///
19 | // MIMPieChart.h
20 | // MIMChartLib
21 | //
22 | // Created by Reetu Raj on 10/08/11.
23 | // Copyright (c) 2012 __MIM 2D__. All rights reserved.
24 | //
25 |
26 | #import
27 | #import
28 | #import "Constant.h"
29 |
30 |
31 | @interface MIMPieChart : UIView {
32 |
33 | float radius_;
34 |
35 | NSMutableArray *valueArray_;
36 | NSMutableArray *angleArrays_;
37 | NSMutableArray *titleArray_;
38 | NSMutableArray *colorArray_;
39 | NSMutableArray *borderColorArray_;
40 |
41 | NSArray *gradientArray_;
42 | NSArray *gradientTypeArray_;
43 |
44 |
45 |
46 | BOOL enableBottomTitles;
47 | BOOL glossEffect;
48 | float borderWidth_;
49 | NSInteger tintValue;
50 |
51 |
52 | //Background Related:
53 | CGGradientRef backgroundGradient;
54 | UIColor *backgroundColor;
55 | UIView *backgroundView;
56 |
57 |
58 | //Double Tap always brings out the detailed section view
59 |
60 |
61 | //Style variable
62 | //style 1: titles are given to the right on a scrollview. On highlighting, it pops up and eases out , user can define
63 | //position of scrollview being left or right. With each title there is a display detailed info button.
64 | //style 2: whenever a section of pie is touched, pie rotates to bring the touched section on top and a popup appears
65 | //with display detailed info button on it.
66 |
67 |
68 |
69 | float centerX_;
70 | float centerY_;
71 |
72 |
73 | int selectedPie;
74 | BOOL returnBackToOriginalLocation;
75 | TINTCOLOR tint;
76 | int stateOfPiece; // 1 is selected 2 is unselected.
77 | int previousStateOfPiece;// 1 is selected 2 is unselected.
78 |
79 |
80 |
81 | }
82 | @property(nonatomic,assign)float radius_;
83 |
84 | @property(nonatomic,retain)NSMutableArray *valueArray_;
85 | @property(nonatomic,retain)NSMutableArray *angleArrays_;
86 | @property(nonatomic,retain)NSMutableArray *titleArray_;
87 | @property(nonatomic,retain)NSMutableArray *colorArray_;
88 | @property(nonatomic,retain)NSMutableArray *borderColorArray_;
89 |
90 | @property(nonatomic,retain)NSArray *gradientArray_;
91 | @property(nonatomic,retain)NSArray *gradientTypeArray_;
92 |
93 |
94 |
95 |
96 |
97 |
98 | @property(nonatomic,assign)NSInteger tintValue;
99 |
100 | @property(nonatomic,assign)BOOL enableBottomTitles;
101 | @property(nonatomic,assign)BOOL glossEffect;
102 | @property(nonatomic,assign)float borderWidth_;
103 |
104 |
105 | @property(nonatomic,assign) TINTCOLOR tint;
106 |
107 | //Background Related:
108 | @property(nonatomic,assign)CGGradientRef backgroundGradient;
109 | @property(nonatomic,retain)UIColor *backgroundColor;
110 | @property(nonatomic,retain)UIView *backgroundView;
111 |
112 | //center Related
113 | @property(nonatomic,assign)float centerX_;
114 | @property(nonatomic,assign)float centerY_;
115 |
116 |
117 | -(void)readFromCSV:(NSString*)path TitleAtColumn:(int)tcolumn DataAtColumn:(int)dcolumn;
118 |
119 |
120 | /*
121 | Ok here user can send the values in Array like [NSArray arraywithObjects:@"21",@"55",@"120",@"45"]
122 | User can opt to send the titleArray:
123 | colorsArray should be array of MIMColor class.
124 |
125 | How to Add MIMColor Object:
126 |
127 |
128 | */
129 | -(void)readFromArray:(NSArray*)valuearray Title:(NSArray *)titlesArray Color:(NSArray *)colorsArray;
130 |
131 |
132 | -(void)drawPieChart;
133 | -(void)drawBottomTitlesText;
134 |
135 | -(float)returnSum:(NSArray *)array;
136 |
137 |
138 | @end
139 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/MIMPieChartDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMPieChartDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 | #import "MIMColorClass.h"
12 |
13 |
14 | @protocol MIMPieChartDelegate
15 |
16 |
17 |
18 | @optional
19 |
20 | /**User can choose to give his own UI for detail Pop up ***/
21 | -(UIView *)viewForPopUpAtIndex:(int)index;
22 |
23 |
24 |
25 | /************************************************************************************************************************************************/
26 | // PROPERTIES OF PIECHART
27 | /************************************************************************************************************************************************/
28 |
29 | -(float)radiusForPie:(id)pieChart;
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | /************************************************************************************************************************************************/
39 | // BACKGROUND
40 | /************************************************************************************************************************************************/
41 |
42 | //Set background simple Color
43 | -(MIMColorClass *)colorForBackground:(id)pieChart;
44 |
45 | //Set background gradient
46 |
47 |
48 |
49 | //Set background UIView
50 |
51 |
52 |
53 | /************************************************************************************************************************************************/
54 | // VALUES FOR PIECHART
55 | /************************************************************************************************************************************************/
56 |
57 | -(NSArray *)valuesForPie:(id)pieChart;
58 |
59 |
60 | /**********************************************************************************************************************/
61 | // TITLES FOR PIECHART
62 | /**********************************************************************************************************************/
63 |
64 | -(NSArray *)titlesForPie:(id)pieChart;
65 | -(NSArray *)DescriptionForPie:(id)pieChart;
66 | -(NSArray *)IconForPie:(id)pieChart;
67 |
68 |
69 |
70 |
71 |
72 | /************************************************************************************************************************************************/
73 | // COLORS FOR PIE SECTIONS
74 | /************************************************************************************************************************************************/
75 |
76 |
77 |
78 | //User can give simple color array
79 | -(NSArray *)colorsForPie:(id)pieChart;
80 |
81 |
82 |
83 | //User can give border colors for each pie
84 | //In Future, it will pick up light/dark mode for border colors Automatically.
85 | -(NSArray *)bordercolorsForPie:(id)pieChart;
86 |
87 | //User should be able to give an array of gradient CGGradientRef and also how to be applied like line or circular.
88 | //User should be able to give dic of colors and we will create the gradient for them
89 | -(NSArray *)gradientsForPie:(id)pieChart;
90 |
91 | /*If this delegate method is not called, it just applies radial gradient */
92 | /*If you pass only single gradient in this, it will apply that gradient to all */
93 | /*If you return same number of elements as number of sections in piechart, it will apply them in clockwise order */
94 | -(NSArray *)gradientsTypeForPie:(id)pieChart;
95 |
96 |
97 | -(BOOL)hideInfoBox:(id)pieChart;
98 |
99 |
100 | -(NSDictionary *)infoBoxProperties:(id)pieChart;
101 |
102 |
103 | /************************************************************************************************************************************************/
104 | // VALUES FOR PIECHART
105 | /************************************************************************************************************************************************/
106 |
107 |
108 |
109 | /************************************************************************************************************************************************/
110 | // DETAILED VIEW FOR PIE SECTIONS
111 | /************************************************************************************************************************************************/
112 |
113 |
114 | -(UIView *)detailedViewForPieSectionAtIndex:(int)index;
115 |
116 |
117 |
118 | //BY default, Gloss of OFF, you can have gloss effect by returning YES in this
119 | //delegate method.
120 | -(BOOL)GlossEffect;
121 | -(float)BorderWidth; //it takes default value of 2.0 px
122 | -(UIColor *)BorderColor;
123 | @end
124 |
125 |
126 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/OthersPart1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/OthersPart1.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/OthersPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // OthersPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMColorClass.h"
11 | #import "MIMPieChart.h"
12 | #import "MIMPieChartDelegate.h"
13 | #import "MIMColor.h"
14 |
15 |
16 | @interface OthersPieChart : UIView
17 | {
18 |
19 |
20 | MIMPieChart *pieChart;
21 | id delegate;
22 |
23 | MIMColorClass *dividerColor;
24 | CGGradientRef dividerGradient;
25 | TINTCOLOR tint;
26 |
27 |
28 | @private
29 |
30 |
31 | }
32 |
33 |
34 | @property (nonatomic,retain) id delegate;
35 | @property (nonatomic,retain) MIMColorClass *dividerColor;
36 | @property (nonatomic,assign) CGGradientRef dividerGradient;
37 | @property (nonatomic,assign) TINTCOLOR tint;
38 | -(void)drawPieChart;
39 |
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/PaddedPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // PaddedPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMPieChart.h"
11 | #import "MIMPieChartDelegate.h"
12 | #import "MIMColorClass.h"
13 |
14 |
15 | @interface PaddedPieChart : UIView
16 | {
17 | MIMPieChart *pieChart;
18 | id delegate;
19 | float paddingPixels;
20 | BOOL glossEffect;
21 | float borderWidth;
22 |
23 | //This lets user touch the pieChart, rotate it.
24 | BOOL userTouchAllowed;
25 |
26 | @private
27 | float maxPForS1;
28 | int selectedPie;
29 | BOOL returnBackToOriginalLocation;
30 | MIMColorClass *bgColor;
31 |
32 | }
33 | @property (nonatomic,retain) id delegate;
34 | @property (nonatomic,assign) float paddingPixels;
35 | @property (nonatomic,assign) BOOL glossEffect;
36 | @property (nonatomic,assign) float borderWidth;
37 | @property (nonatomic,assign)BOOL userTouchAllowed;
38 |
39 |
40 | -(void)drawPieChart;
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/PermanentScroller.h:
--------------------------------------------------------------------------------
1 | //
2 | // PermanentScroller.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/17/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIImageView (PermanentScroller)
12 |
13 | - (void) setAlpha:(float)alpha ;
14 | @end
15 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/PermanentScroller.m:
--------------------------------------------------------------------------------
1 | //
2 | // PermanentScroller.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/17/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "PermanentScroller.h"
10 |
11 |
12 |
13 | #define noDisableVerticalScrollTag 836913
14 | #define noDisableHorizontalScrollTag 836914
15 |
16 | @implementation UIImageView (PermanentScroller)
17 |
18 | - (void) setAlpha:(float)alpha
19 | {
20 |
21 | if (self.superview.tag == noDisableVerticalScrollTag) {
22 | if (alpha == 0 && self.autoresizingMask == UIViewAutoresizingFlexibleLeftMargin) {
23 | if (self.frame.size.width < 10 && self.frame.size.height > self.frame.size.width) {
24 | UIScrollView *sc = (UIScrollView*)self.superview;
25 | if (sc.frame.size.height < sc.contentSize.height) {
26 | return;
27 | }
28 | }
29 | }
30 | }
31 |
32 | if (self.superview.tag == noDisableHorizontalScrollTag) {
33 | if (alpha == 0 && self.autoresizingMask == UIViewAutoresizingFlexibleTopMargin) {
34 | if (self.frame.size.height < 10 && self.frame.size.height < self.frame.size.width) {
35 | UIScrollView *sc = (UIScrollView*)self.superview;
36 | if (sc.frame.size.width < sc.contentSize.width) {
37 | return;
38 | }
39 | }
40 | }
41 | }
42 |
43 | [super setAlpha:alpha];
44 | }
45 | @end
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/PieBubble.h:
--------------------------------------------------------------------------------
1 | //
2 | // PieBubble.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/18/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 | @interface PieBubble : UIView
12 | {
13 | @private
14 | PIE_BUBBLE_STYLE bubbleStyle;
15 | NSString *bubbleString;
16 | int quadrant_;
17 | }
18 |
19 |
20 | -(void)DrawBubbleWithStyle:(PIE_BUBBLE_STYLE)style withText:(NSString *)text inQuadrant:(int)quadrant;
21 | @end
22 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/RightTriangleIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/RightTriangleIcon.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/RightTriangleIconBlack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/RightTriangleIconBlack.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/ScrollViewSubClass.h:
--------------------------------------------------------------------------------
1 | //
2 | // ScrollViewSubClass.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/17/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ScrollViewSubClass : UIScrollView
12 | {
13 |
14 | }
15 | @end
16 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/ScrollViewSubClass.m:
--------------------------------------------------------------------------------
1 | //
2 | // ScrollViewSubClass.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/17/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import "ScrollViewSubClass.h"
10 | #import "InfoBoxStyle1.h"
11 |
12 | @implementation ScrollViewSubClass
13 |
14 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
15 | {
16 |
17 | UITouch *touch = [touches anyObject];
18 | CGPoint touchPoint=[touch locationInView:self];
19 | int tag=touchPoint.y/30;
20 |
21 | [(InfoBoxStyle1 *)self.superview LabelTapped:tag];
22 |
23 |
24 | }
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/SectionedPieChart.h:
--------------------------------------------------------------------------------
1 | //
2 | // SectionedPieChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Mac Mac on 3/14/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MIMColorClass.h"
11 | #import "MIMPieChart.h"
12 | #import "MIMPieChartDelegate.h"
13 | #import "MIMColor.h"
14 |
15 | @interface SectionedPieChart : UIView
16 | {
17 | MIMPieChart *pieChart;
18 | id delegate;
19 |
20 | MIMColorClass *dividerColor;
21 | CGGradientRef dividerGradient;
22 | TINTCOLOR tint;
23 |
24 | //This lets user touch the pieChart, rotate it.
25 | BOOL userTouchAllowed;
26 |
27 | @private
28 | BOOL dividerInfoProvided;
29 | MIMColorClass *bgColor;
30 |
31 |
32 | }
33 | @property (nonatomic,retain) id delegate;
34 | @property (nonatomic,retain) MIMColorClass *dividerColor;
35 | @property (nonatomic,assign) CGGradientRef dividerGradient;
36 | @property (nonatomic,assign) TINTCOLOR tint;
37 | @property (nonatomic,assign)BOOL userTouchAllowed;
38 |
39 |
40 | -(void)drawPieChart;
41 |
42 |
43 | //There should be an option for user to create basic gradient with color in case
44 | //he doesnt want to get into apple's method.
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/layeredpiechart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/layeredpiechart.jpg
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/otherspart2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/otherspart2.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/padded_pie_chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/padded_pie_chart.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/pie_pop_over_gradient.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/pie_pop_over_gradient.jpg
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/sectioned_pie_chart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/sectioned_pie_chart.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Pie Chart/trophy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ReetuBok/MIMChart-Library/049e1d60aeadb19e2fb6fbbe11ba31dc48d35208/MIMChartLib/Lib Files/Pie Chart/trophy.png
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Range Chart/MIMLongRangeGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMLongRangeChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 11/1/12.
6 | //
7 | //
8 |
9 | #import
10 | #import "Constant.h"
11 |
12 | @interface MIMLongRangeGraph : UIView
13 | {
14 | float gridHeight;
15 | float scalingX;
16 | float scalingY;
17 | BOOL xIsString;
18 |
19 |
20 | NSArray *lineColorArray;
21 | NSArray *lineBezierPath;
22 | NSArray *aPropertiesArray;
23 |
24 | NSMutableArray *xValElements;
25 | NSMutableArray *yValElements;
26 | float leftMargin;
27 | float bottomMargin;
28 | float xAxisHeight;
29 | }
30 |
31 |
32 | @property(nonatomic,assign)float gridHeight;
33 | @property(nonatomic,assign)float scalingX;
34 | @property(nonatomic,assign)float scalingY;
35 | @property(nonatomic,assign)BOOL xIsString;
36 | @property(nonatomic,assign)float rangeLineThickness;
37 |
38 | @property(nonatomic,retain)NSArray *lineColorArray;
39 | @property(nonatomic,retain)NSArray *lineBezierPath;
40 | @property(nonatomic,retain)NSArray *aPropertiesArray;
41 |
42 | @property(nonatomic,retain)NSMutableArray *xValElements;
43 | @property(nonatomic,retain)NSMutableArray *yValElements;
44 | @property(nonatomic,assign)float leftMargin;
45 | @property(nonatomic,assign)float bottomMargin;
46 | @property(nonatomic,assign)float xAxisHeight;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Range Chart/MIMLongRangeGraph.m:
--------------------------------------------------------------------------------
1 | //
2 | // MIMLongRangeChart.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 11/1/12.
6 | //
7 | //
8 |
9 | #import "MIMLongRangeGraph.h"
10 |
11 | @implementation MIMLongRangeGraph
12 |
13 | @synthesize gridHeight;
14 | @synthesize scalingX;
15 | @synthesize scalingY;
16 | @synthesize xIsString;
17 | @synthesize rangeLineThickness;
18 |
19 | @synthesize lineColorArray;
20 | @synthesize lineBezierPath;
21 | @synthesize aPropertiesArray;
22 | @synthesize xValElements;
23 | @synthesize yValElements;
24 | @synthesize bottomMargin,leftMargin,xAxisHeight;
25 |
26 | - (id)initWithFrame:(CGRect)frame
27 | {
28 | self = [super initWithFrame:frame];
29 | if (self) {
30 | // Initialization code
31 | [self setBackgroundColor:[UIColor clearColor]];
32 |
33 | }
34 | return self;
35 | }
36 |
37 | - (void)drawRect:(CGRect)rect
38 | {
39 |
40 |
41 | if([xValElements count]==0)
42 | return;
43 |
44 | // Drawing code
45 | CGContextRef context = UIGraphicsGetCurrentContext();
46 |
47 | CGContextSetAllowsAntialiasing(context, NO);
48 | CGContextSetShouldAntialias(context, NO);
49 |
50 | CGAffineTransform flipTransform = CGAffineTransformMake( 1, 0, 0, -1, 0, self.frame.size.height);
51 | CGContextConcatCTM(context, flipTransform);
52 |
53 |
54 |
55 | //Clear the background
56 | //Set Background Clear.
57 | CGContextSaveGState(context);
58 | float k=1.0;
59 | CGRect aR=self.frame;
60 | aR.origin.x=0;
61 | aR.origin.y=0;
62 | CGContextSetBlendMode(context, kCGBlendModeClear);
63 | CGContextSetFillColorWithColor(context, [UIColor colorWithRed:k green:k blue:k alpha:1.0].CGColor);
64 | CGContextAddRect(context, aR);
65 | CGContextFillPath(context);
66 | CGContextRestoreGState(context);
67 |
68 |
69 |
70 | CGContextSetBlendMode(context, kCGBlendModeNormal);
71 | CGContextSetAllowsAntialiasing(context, YES);
72 | CGContextSetShouldAntialias(context, YES);
73 |
74 |
75 | for (int i=0; i<[lineBezierPath count]; i++)
76 | {
77 |
78 |
79 |
80 | MIMColorClass *c=[lineColorArray objectAtIndex:0];
81 | if([lineColorArray count]==[lineBezierPath count])
82 | {
83 | c=[lineColorArray objectAtIndex:i];
84 | }
85 |
86 |
87 | UIColor *_color=[[UIColor alloc]initWithRed:c.red green:c.green blue:c.blue alpha:c.alpha];
88 | [_color setStroke];
89 | UIBezierPath *myP=[lineBezierPath objectAtIndex:i];
90 | [myP setLineWidth:rangeLineThickness];
91 | [myP strokeWithBlendMode:kCGBlendModeNormal alpha:1.0];
92 |
93 |
94 |
95 |
96 | }
97 |
98 |
99 |
100 | }
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Range Chart/MIMRangeGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMRangeChart.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 11/1/12.
6 | //
7 | //
8 |
9 | #import
10 | #import "RangeGraphDelegate.h"
11 | #import "Constant.h"
12 | #import "MIMLongRangeGraph.h"
13 |
14 | @interface MIMRangeGraph : UIView
15 | {
16 | iddelegate;
17 |
18 |
19 | NSMutableArray *anchorTypeArray;//ANCHORTYPE
20 | XTitleStyle xTitleStyle;//
21 | MIMColorClass *mbackgroundColor;
22 | NSArray *rangeColorArray;//Make a color Array too.
23 | BOOL minimumLabelOnYIsZero;
24 | UILabel *titleLabel;
25 | float rangeLineThickness;
26 |
27 | float rightMargin;
28 | float topMargin;
29 | float leftMargin;
30 | float bottomMargin;
31 | }
32 |
33 | @property(nonatomic,retain)iddelegate;
34 |
35 | @property(nonatomic,assign)XTitleStyle xTitleStyle;
36 | @property(nonatomic,retain)NSMutableArray *anchorTypeArray;
37 | @property(nonatomic,retain)MIMColorClass *mbackgroundColor;
38 | @property(nonatomic,retain)NSArray *rangeColorArray;
39 | @property(nonatomic,assign)BOOL minimumLabelOnYIsZero;
40 | @property(nonatomic,retain)UILabel *titleLabel;
41 | @property(nonatomic,assign)float rangeLineThickness;
42 |
43 | @property(nonatomic,assign)float rightMargin;
44 | @property(nonatomic,assign)float topMargin;
45 | @property(nonatomic,assign)float leftMargin;
46 | @property(nonatomic,assign)float bottomMargin;
47 |
48 | -(void)drawMIMRangeGraph;
49 | @end
50 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Range Chart/RangeGraphDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // RangeChartDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj Bok on 11/1/12.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @protocol RangeGraphDelegate
12 |
13 | @optional
14 |
15 | -(NSArray *)valuesForGraph:(id)graph; /*This values are plot on Y-Axis*/
16 | -(NSArray *)valuesForXAxis:(id)graph;/*This values are plot on X-Axis*/
17 | -(NSArray *)titlesForXAxis:(id)graph;/*These titles are displayed on X-Axis*/
18 | -(NSArray *)numericValuesForXAxis:(id)graph;/*These titles are displayed on X-Axis*/
19 | -(NSArray *)titlesForYAxis:(id)graph;/*If given,These titles are displayed on Y-Axis*/
20 |
21 |
22 | -(NSDictionary *)horizontalLinesProperties:(id)graph; //hide,color,gap,width
23 | -(NSDictionary *)verticalLinesProperties:(id)graph;
24 | -(NSDictionary *)xAxisProperties:(id)graph;//hide,color,width,linewidth,style
25 | -(NSDictionary *)yAxisProperties:(id)graph;//hide,color,width,linewidth,style
26 | -(NSDictionary *)chartTitleProperties:(id)graph;//hide,color,frame,font
27 |
28 | -(NSDictionary *)rangeChartProperties:(id)graph;//style(line with dots on end, line with square on end, just a bar), width (how thick line/bar is going to be)
29 |
30 | -(UIView *)backgroundViewForRangeChart:(id)graph;
31 | -(NSArray *)ColorsForRangeChart:(id)graph;
32 | -(NSArray *)AnchorProperties:(id)graph;
33 | //NSArray of NSDictionary with keys style,radius,shadowRadius,touchenabled,color,bordercolor,border width.
34 |
35 | @end
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Wall Graph/MIMWallGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // MIMWallGraph.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 7/4/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "WallGraphDelegate.h"
11 | #import "Constant.h"
12 | #import "MultiWallLongGraph.h"
13 | #import "MIMMargin.h"
14 |
15 | @interface MIMWallGraph : UIView
16 | {
17 | BOOL fitsToScreenWidth;
18 | BOOL isGradient;
19 | BOOL displayMeterline;
20 | float meterLineYOffset;
21 |
22 | XTitleStyle xTitleStyle;
23 | MIMColorClass *mbackgroundColor;
24 |
25 | iddelegate;
26 |
27 | NSArray *anchorTypeArray;
28 |
29 | NSArray *wallColorArray;
30 | NSArray *wallGradientArray;
31 | BOOL minimumLabelOnYIsZero;
32 | UILabel *titleLabel;
33 |
34 | MIMMargin margin;
35 |
36 | MIMFloatingView *floatingView;
37 |
38 | }
39 |
40 | @property(nonatomic,retain)iddelegate;
41 | @property(nonatomic,assign)BOOL fitsToScreenWidth;
42 | @property(nonatomic,assign)BOOL isGradient;
43 | @property(nonatomic,assign)BOOL displayMeterline;
44 | @property(nonatomic,assign)float meterLineYOffset;
45 |
46 | @property(nonatomic,assign)XTitleStyle xTitleStyle;
47 | @property(nonatomic,retain)MIMColorClass *mbackgroundColor;
48 |
49 | @property(nonatomic,retain)NSArray *anchorTypeArray;
50 | @property(nonatomic,retain)NSArray *wallColorArray;
51 | @property(nonatomic,retain)NSArray *wallGradientArray;
52 | @property(nonatomic,assign)BOOL minimumLabelOnYIsZero;
53 | @property(nonatomic,retain)UILabel *titleLabel;
54 |
55 | @property(nonatomic,assign)MIMMargin margin;
56 |
57 | -(void)drawMIMWallGraph;
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Wall Graph/MultiWallLongGraph.h:
--------------------------------------------------------------------------------
1 | //
2 | // MultiWallLongGraph.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 5/28/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "WallGraphDelegate.h"
11 | #import "Anchor.h"
12 | #import "AnchorInfo.h"
13 | #import "MIMColor.h"
14 | #import "LineInfoBox.h"
15 | #import "YAxisBand.h"
16 | #import "XAxisBand.h"
17 | #import "MIM_MathClass.h"
18 | #import "Constant.h"
19 | #import "MIMProperties.h"
20 |
21 |
22 | @interface MultiWallLongGraph : UIView
23 | {
24 |
25 | float gridHeight;
26 |
27 |
28 | float scalingX;
29 | float scalingY;
30 | BOOL xIsString;
31 | BOOL isGradient;
32 | float xOffset;
33 | float minimumOnY;
34 |
35 | NSArray *wallBezierPath;
36 | NSArray *wallEdgeBezierPath;
37 |
38 |
39 | NSMutableArray *xValElements;
40 | NSMutableArray *yValElements;
41 |
42 |
43 |
44 | NSArray *wallColorArray;
45 | NSArray *edgeColorArray;
46 | NSArray *wallGradientArray;
47 | NSArray *orderArray;//Needed for Anchors
48 | NSArray *maxValuesArray;
49 | NSArray *aPropertiesArray;
50 | NSArray *anchorTypeArray;
51 |
52 |
53 | float METERLINEHEIGHT;
54 |
55 | float rightMargin;
56 | float topMargin;
57 | float leftMargin;
58 | float bottomMargin;
59 |
60 | float barOffset; //something to do graph overlaying bars
61 |
62 | }
63 |
64 |
65 | @property(nonatomic,assign)float gridHeight;
66 |
67 | @property(nonatomic,assign)float scalingX;
68 | @property(nonatomic,assign)float scalingY;
69 | @property(nonatomic,assign)BOOL xIsString;
70 | @property(nonatomic,assign)BOOL isGradient;
71 | @property(nonatomic,assign)float xOffset;
72 | @property(nonatomic,assign)float minimumOnY;
73 |
74 | @property(nonatomic,retain)NSArray *wallBezierPath;
75 | @property(nonatomic,retain)NSArray *wallEdgeBezierPath;
76 |
77 | @property(nonatomic,retain)NSMutableArray *xValElements;
78 | @property(nonatomic,retain)NSMutableArray *yValElements;
79 |
80 | @property(nonatomic,retain)NSArray *aPropertiesArray;
81 | @property(nonatomic,retain)NSArray *anchorTypeArray;
82 |
83 | @property(nonatomic,retain)NSArray *wallColorArray;
84 | @property(nonatomic,retain)NSArray *edgeColorArray;
85 | @property(nonatomic,retain)NSArray *wallGradientArray;
86 | @property(nonatomic,retain)NSArray *orderArray;//Needed for Anchors
87 | @property(nonatomic,retain)NSArray *maxValuesArray;
88 | @property(nonatomic,assign)float METERLINEHEIGHT;
89 |
90 | @property(nonatomic,assign)float rightMargin;
91 | @property(nonatomic,assign)float topMargin;
92 | @property(nonatomic,assign)float leftMargin;
93 | @property(nonatomic,assign)float bottomMargin;
94 |
95 | @property(nonatomic,assign)float barOffset;
96 | @end
97 |
--------------------------------------------------------------------------------
/MIMChartLib/Lib Files/Wall Graph/WallGraphDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // WallGraphDelegate.h
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/30/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 | #import "MIMColorClass.h"
9 |
10 | #ifndef MIMChartLib_WallGraphDelegate_h
11 | #define MIMChartLib_WallGraphDelegate_h
12 | @protocol WallGraphDelegate
13 | @optional
14 |
15 |
16 | -(NSArray *)valuesForGraph:(id)graph; /*This values are plot on Y-Axis*/
17 | -(NSArray *)valuesForXAxis:(id)graph;/*This values are plot on X-Axis*/
18 | -(NSArray *)titlesForXAxis:(id)graph;/*These titles are displayed on X-Axis*/
19 | -(NSArray *)titlesForYAxis:(id)graph;/*If given,These titles are displayed on Y-Axis*/
20 |
21 |
22 | -(NSDictionary *)horizontalLinesProperties:(id)graph; //hide,color,gap,width
23 | -(NSDictionary *)verticalLinesProperties:(id)graph;
24 | -(NSDictionary *)xAxisProperties:(id)graph;//hide,color,width,style,margin(bottom)
25 | -(NSDictionary *)yAxisProperties:(id)graph;//hide,color,width,style,margin(left)
26 |
27 |
28 | -(UIView *)backgroundViewForWallChart:(id)graph;
29 |
30 |
31 | -(NSArray *)ColorsForWallChart:(id)graph;
32 |
33 | -(NSArray *)AnchorProperties:(id)graph;
34 | -(NSArray *)WallProperties:(id)graph; //hide,borderwidth (of wall border),patternStyle,gradient,color
35 |
36 |
37 |
38 |
39 | @end
40 |
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/MIMChartLib/MIMChartLib-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFiles
12 |
13 | Icon.png
14 | Icon@2x.png
15 | Icon-72.png
16 |
17 | CFBundleIdentifier
18 | com.mim.${PRODUCT_NAME:rfc1034identifier}
19 | CFBundleInfoDictionaryVersion
20 | 6.0
21 | CFBundleName
22 | ${PRODUCT_NAME}
23 | CFBundlePackageType
24 | APPL
25 | CFBundleShortVersionString
26 | 1.0
27 | CFBundleSignature
28 | ????
29 | CFBundleVersion
30 | 1.0
31 | LSRequiresIPhoneOS
32 |
33 | UIRequiredDeviceCapabilities
34 |
35 | armv7
36 |
37 | UISupportedInterfaceOrientations
38 |
39 | UIInterfaceOrientationPortraitUpsideDown
40 | UIInterfaceOrientationPortrait
41 |
42 | UISupportedInterfaceOrientations~ipad
43 |
44 | UIInterfaceOrientationPortrait
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/MIMChartLib/MIMChartLib-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'MIMChartLib' target in the 'MIMChartLib' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_3_0
8 | #warning "This project uses features only available in iOS SDK 3.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/MIMChartLib/MainController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011- 2012 Reetu Raj (reetu.raj@gmail.com)
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5 | and associated documentation files (the “Software”), to deal in the Software without
6 | restriction, including without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
8 | the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or
11 | substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 | */
19 | //
20 | // MainController.h
21 | // MIMChartLib
22 | //
23 | // Created by Reetu Raj on 4/25/12.
24 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
25 | //
26 |
27 | #import
28 |
29 | @interface MainController : UIViewController
30 | {
31 | IBOutlet UITableView *myTableView;
32 | NSArray *chartTypeSectionArray;
33 | NSArray *featureListCellArray;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/MIMChartLib/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/MIMChartLib/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MIMChartLib
4 | //
5 | // Created by Reetu Raj on 4/25/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | This is a project (Opensource library)of chart libraries which can used in iPhone/iPads.
2 | Charts available:
3 | 1.Pie Chart
4 | 2.Line Graph
5 | 3.Wall Graph
6 | 4.Bar Graph (Simple, Grouped, Stacked)
7 | 5.Fragmented Pie Chart
8 |
9 |
10 | --------------------------------------------------------------
11 | Beta Version 1.5
12 | --------------------------------------------------------------
13 |
14 |
15 |
16 |
17 | --------------------------------------------------------------
18 | HOW TO USE IT IN YOUR CODE
19 | --------------------------------------------------------------
20 | 1. Add all the needed frameworks for sure.
21 | 2. Copy and Paste "Lib Files" folder in your project and Also add them to your project by right clicking your project in XCode and choose "Add files to your project". Note "Lib Files" folder can be found under MIMChartLib > "Lib Files" in MIMChart Project.
22 | 3. Then you can add the chart of your purpose to your view in your app.
23 | 4. See Sample Code under "How to Use folder in XCode Project" to see how it is done
24 | To find out more about how to stick the chart in your view please see the sample codes.
25 |
26 |
27 |
28 | NOTE: Memory testing hasn't been done yet. Code quality check is not done yet.
29 |
30 | Screenshots: http://soulwithmobiletechnology.blogspot.com/2011/08/iphoneipad-chart-librarymimchartlib.html
31 | Official Website with Documentation: http://mimchartlibrary.blogspot.com/
--------------------------------------------------------------------------------