Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
PNChart
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
MrWooJ
2014-12-04 11:14:29 +0330
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a675504ecc3a28fa2732b7de449ad0316b5c84fa
a675504e
1 parent
96490bb6
Adding PNScatterChart - DataItem
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
PNChart/PNScatterChartDataItem.h
PNChart/PNScatterChartDataItem.m
PNChart/PNScatterChartDataItem.h
0 → 100644
View file @
a675504
//
// PNScatterChartDataItem.h
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
PNScatterChartDataItem
:
NSObject
+
(
PNScatterChartDataItem
*
)
dataItemWithX
:(
CGFloat
)
x
AndWithY
:(
CGFloat
)
y
;
@property
(
readonly
)
CGFloat
x
;
// should be within the x range
@property
(
readonly
)
CGFloat
y
;
// should be within the y range
@end
...
...
PNChart/PNScatterChartDataItem.m
0 → 100644
View file @
a675504
//
// PNScatterChartDataItem.m
// PNChartDemo
//
// Created by Alireza Arabi on 12/4/14.
// Copyright (c) 2014 kevinzhow. All rights reserved.
//
#import "PNScatterChartDataItem.h"
@interface
PNScatterChartDataItem
()
-
(
id
)
initWithX
:
(
CGFloat
)
x
AndWithY
:
(
CGFloat
)
y
;
@property
(
readwrite
)
CGFloat
x
;
// should be within the x range
@property
(
readwrite
)
CGFloat
y
;
// should be within the y range
@end
@implementation
PNScatterChartDataItem
+
(
PNScatterChartDataItem
*
)
dataItemWithX
:(
CGFloat
)
x
AndWithY
:(
CGFloat
)
y
{
return
[[
PNScatterChartDataItem
alloc
]
initWithX
:
x
AndWithY
:
y
];
}
-
(
id
)
initWithX
:(
CGFloat
)
x
AndWithY
:(
CGFloat
)
y
{
if
((
self
=
[
super
init
]))
{
self
.
x
=
x
;
self
.
y
=
y
;
}
return
self
;
}
@end
...
...
Please
register
or
login
to post a comment