मुझे धुरी लेबल के साथ कुछ परेशानी हो रही है। ऐसा लगता है कि मेरे कस्टम लेबल साजिश क्षेत्र के बाहर दिखाई नहीं दे रहे हैं। मूल साजिश के लिए Design Overview पर देखकर, धुरी लेबल साजिश क्षेत्र के बाहर होना चाहिए। कोई विचार है कि मैं उन्हें साजिश क्षेत्र के बाहर कैसे दिख सकता हूं?कोर प्लॉट अक्ष लेबल प्लॉट क्षेत्र के बाहर दिखाई नहीं दे रहे हैं
नीचे दिए गए कोड/छवि से पता चलता है कि लेबल केवल साजिश क्षेत्र के भीतर कैसे दिखाए जाते हैं। यदि मैं लेबल ऑफ़सेट को सकारात्मक संख्या में बदलता हूं, तो लेबल बिल्कुल दिखाई नहीं देते हैं। मैं आईओएस 5 के साथ कोर प्लॉट 0.9 का उपयोग कर रहा हूं।
अग्रिम धन्यवाद!
CPTTheme *theme = [CPTTheme themeNamed:kCPTPlainWhiteTheme];
graph = [[theme newGraph] retain];;
CPTGraphHostingView *hostingView = (CPTGraphHostingView *)self.view;
hostingView.hostedGraph = graph;
graph.paddingLeft = 40.0;
graph.paddingTop = 40.0;
graph.paddingRight = 40.0;
graph.paddingBottom = 40.0;
graph.masksToBorder = NO;
// ... setup axis
axisSet.yAxis.majorIntervalLength = CPTDecimalFromInt(0);
axisSet.yAxis.minorTicksPerInterval = 0;
axisSet.yAxis.labelingPolicy = CPTAxisLabelingPolicyNone;
// if this number is negative, the labels show,
// if it is positive, that is outside the plot area, the labels are hidden.
axisSet.yAxis.labelOffset = -20;
// ... setup labels
NSMutableArray *labels = [NSMutableArray array];
for (int i = 0; i < reportData.rowCount; ++i) {
CPTAxisLabel *label = [[CPTAxisLabel alloc] initWithText:[NSString stringWithFormat:@"Test Row %i", i] textStyle:labelStyle];
label.tickLocation = CPTDecimalFromInt(i);
label.offset = axisSet.yAxis.labelOffset;
label.alignment = CPTAlignmentLeft;
[labels addObject:label];
[label release];
}
axisSet.yAxis.axisLabels = [NSSet setWithArray:labels];
धन्यवाद:
अंत में मैं यह सीमा मास्किंग को बंद करने, इस तरह से काम करने के लिए मिल गया है! उस विकल्प को नहीं देखा। –
कोरप्लॉट –