SCIAxisCoreProtocol.h
Go to the documentation of this file.
1 //******************************************************************************
2 // SCICHART® Copyright SciChart Ltd. 2011-2018. All rights reserved.
3 //
4 // Web: http://www.scichart.com
5 // Support: support@scichart.com
6 // Sales: sales@scichart.com
7 //
8 // SCIAxisCoreProtocol.h is part of SCICHART®, High Performance Scientific Charts
9 // For full terms and conditions of the license, see http://www.scichart.com/scichart-eula/
10 //
11 // This source code is protected by international copyright law. Unauthorized
12 // reproduction, reverse-engineering, or distribution of all or any portion of
13 // this source code is strictly prohibited.
14 //
15 // This source code contains confidential and proprietary trade secrets of
16 // SciChart Ltd., and should at no time be copied, transferred, sold,
17 // distributed or made available without express written permission.
18 //******************************************************************************
23 #import <Foundation/Foundation.h>
25 #import "SCIGenericType.h"
28 
29 @protocol SCIRangeProtocol;
31 @protocol SCITickProviderProtocol;
32 @protocol SCIChartSurfaceProtocol;
33 @class UIView;
34 
43 typedef NS_ENUM(int, SCIAutoRange) {
49 
54 
59 };
60 
61 #pragma mark - SCIAxisCore protocol
62 
76 @property(nonatomic, strong) id <SCIRangeProtocol> visibleRange;
77 
82 @property(nonatomic, strong) id <SCIRangeProtocol> growBy; // <double>
87 @property(nonatomic) SCIGenericType minorDelta;
88 
93 @property(nonatomic) SCIGenericType majorDelta;
94 
100 
105 @property(nonatomic, weak) id <SCIChartSurfaceProtocol> parentSurface;
106 
110 @property(nonatomic, copy) NSString *axisTitle;
111 
115 @property(nonatomic) BOOL flipCoordinates;
116 
120 @property(nonatomic, copy) NSString *textFormatting;
121 
127 
133 
138 @property(nonatomic) int minorsPerMajor;
139 
143 @property(nonatomic) int maxAutoTicks;
144 
148 @property(nonatomic) BOOL autoTicks;
149 
154 @property(nonatomic, strong) id <SCITickProviderProtocol> tickProvider;
155 
160 @property(nonatomic) SCIAutoRange autoRange;
161 
165 @property(nonatomic, copy) NSString *cursorTextFormatting;
166 
170 - (BOOL)isLogarithmicAxis;
171 
175 - (BOOL)hasValidVisibleRange;
176 
178 - (BOOL)hasDefaultVisibleRange;
179 
183 @property(nonatomic) BOOL isXAxis;
184 
190 - (void)animateVisibleRangeTo:(id <SCIRangeProtocol>)to AnimationTime:(float)duration;
191 
192 - (void)animateVisibleRangeTo:(id <SCIRangeProtocol>)to AnimationTime:(float)duration andVelocity:(float)velocity __deprecated;
193 - (void)animateVisibleRangeTo:(id<SCIRangeProtocol>)to AnimationTime:(float)duration velocity:(float)velocity rangeLimit:(id<SCIRangeProtocol>)rangeLimit __deprecated;
194 
199 @property(nonatomic) BOOL animateVisibleRangeChanges;
200 
205 @property(nonatomic) double animatedChangeDuration;
206 
210 - (BOOL)trySetOrAnimateVisibleRange:(id <SCIRangeProtocol>)newRange;
211 
215 - (BOOL)trySetOrAnimateVisibleRange:(id <SCIRangeProtocol>)newRange duration:(float)duration;
216 
221 - (BOOL)isValidRange:(id <SCIRangeProtocol>)range;
222 
226 - (void)validateAxis;
227 
232 
236 - (double)getAxisSize;
237 
243 - (double)getCoordinate:(SCIGenericType)value;
244 
251 - (SCIGenericType)getDataValue:(double)pixelCoordinate __deprecated_msg("please use coordinate calculator to convert to data value");
252 
256 - (double)getAxisOffset;
257 
261 - (void)free;
262 
272 - (id <SCICallbackHelperProtocol>)registerVisibleRangeChangedCallback:(SCIAxisVisibleRangeChanged)callback;
273 
277 @property(nonatomic) UIView* titleCustomView;
278 
279 @end
280 
void free()
Method stops all axis internal timers used for animations.
AutoRange the Axis instance always.
Definition: SCIAxisCoreProtocol.h:53
Never AutoRange the Axis instance.
Definition: SCIAxisCoreProtocol.h:58
Definition: SCIInvalidatableElementProtocol.h:22
id< SCIRangeProtocol > growBy
Gets or sets the GrowBy (0.1, 0.2) will increase the axis extents by 10% (min) and 20% (max) outside ...
Definition: SCIAxisCoreProtocol.h:82
UIView * titleCustomView
Gets or sets Title's custom view.
Definition: SCIAxisCoreProtocol.h:277
SCIAutoRange autoRange
Gets or sets AutoRange mode.
Definition: SCIAxisCoreProtocol.h:160
Definition: SCICallbackHelper.h:24
Classes which implement SCISuspendableProtocol can have updates suspended/resumed.
Definition: SCISuspendableProtocol.h:31
SCIGenericType minorDelta
Gets or sets axis minor ticks spacing.
Definition: SCIAxisCoreProtocol.h:87
double animatedChangeDuration
Gets or sets the Duration used when animates the visible range of the axis to the destination visible...
Definition: SCIAxisCoreProtocol.h:205
SCIAutoRange
@abstract Enumeration constants to define the the autorange behaviour for Axis implementers @discussi...
Definition: SCIAxisCoreProtocol.h:43
void validateAxis()
Called to check the axis properties are valid for rendering.
Definition: SCIGenericType.h:120
id< SCITickProviderProtocol > tickProvider
Gets or sets a SCITickProvider instance on current axis Used to compute the data-values of axis gridl...
Definition: SCIAxisCoreProtocol.h:154
id< SCICoordinateCalculatorProtocol > getCurrentCoordinateCalculator()
Gets the current SCICoordinateCalculator for this axis, based on visible range and axis type.
void(^ SCIAxisVisibleRangeChanged)(id< SCIRangeProtocol > newRange, id< SCIRangeProtocol > oldRange, BOOL isAnimated, id sender)
Definition: SCIRangeChangedCallbackHelper.h:29
int maxAutoTicks
Gets or sets the max ticks.
Definition: SCIAxisCoreProtocol.h:143
Definition: SCITickProviderProtocol.h:23
Defines protocol for Axis core functionality.
Definition: SCIAxisCoreProtocol.h:67
Definition: SCICoordinateCalculatorProtocol.h:35
BOOL animateVisibleRangeChanges
Gets or sets the animated VisibleRange of the Axis @discussion When this property is set,...
Definition: SCIAxisCoreProtocol.h:199
SCIGenericType minimalZoomConstrain
Gets or sets the minimal zoom constrain of the axis @discussion Used to set the minimum distance betw...
Definition: SCIAxisCoreProtocol.h:126
BOOL autoTicks
Gets or sets value, that indicates whether calculate ticks automatically.
Definition: SCIAxisCoreProtocol.h:148
BOOL hasDefaultVisibleRange()
Gets whether Axis has default visible range.
NSString * textFormatting
Gets or sets the TextFormatting string for tick labels on this axis.
Definition: SCIAxisCoreProtocol.h:120
BOOL isXAxis
Gets or sets whether the current axis is an X-Axis or not.
Definition: SCIAxisCoreProtocol.h:183
id< SCIRangeProtocol > getMaximumRange()
Method calculates axis' maximal visible range based on all renderable series' data attached to that a...
BOOL isLogarithmicAxis()
Gets or sets whether the current axis is an logarithmic or not.
SCIGenericType maximalZoomConstrain
Gets or sets the maximum zoom constrain of the axis @discussion Used to set the maximum distance betw...
Definition: SCIAxisCoreProtocol.h:132
SCIGenericType majorDelta
Gets or sets axis major ticks spacing.
Definition: SCIAxisCoreProtocol.h:93
Allows Axis instance decide whether AutoRange or not when show Axis first time, e....
Definition: SCIAxisCoreProtocol.h:48
Description of SCIGenerciType structure and functions for work with it.
id< SCIRangeProtocol > visibleRange
Gets or sets the VisibleRange of the Axis.
Definition: SCIAxisCoreProtocol.h:76
int minorsPerMajor
Gets or sets the number of minor delta ticks per major tick minor ticks count between major ticks.
Definition: SCIAxisCoreProtocol.h:138
Defines protcol for ranges.
Definition: SCIRangeProtocol.h:71
NSString * cursorTextFormatting
Gets or sets the text formatting string for labels on this cursor.
Definition: SCIAxisCoreProtocol.h:165
BOOL flipCoordinates
Gets or sets a flag indicating whether to flip the tick and pixel coordinate generation for this axis...
Definition: SCIAxisCoreProtocol.h:115
NSString * axisTitle
Gets or sets the axis title.
Definition: SCIAxisCoreProtocol.h:110
double getAxisSize()
Gets the size of the axis in the Viewport.
Definition: SCIChartSurface.h:55
double getAxisOffset()
Returns the offset of the Axis.
BOOL hasValidVisibleRange()
Gets whether VisibleRange is valid, e.g.
id< SCIChartSurfaceProtocol > parentSurface
Gets or sets the parent that this Axis belongs to.
Definition: SCIAxisCoreProtocol.h:105