1

试图为我的 gridLines 获得一条简单的虚线,但无法让它工作(目前是块实线)。互联网上没有太多帮助!

   CPTMutableLineStyle *gridLineStyle = [CPTMutableLineStyle lineStyle];
        gridLineStyle.lineColor = [self axisGreyClr];
        //gridLineStyle.lineWidth = 1.0f;
        gridLineStyle.dashPattern = [NSArray arrayWithObjects:[NSNumber numberWithFloat:0.8f], nil];
        gridLineStyle.patternPhase=0.0f;
4

2 回答 2

5

What Eric said above ,Code to get the Dashed Line

CPTMutableLineStyle *gridLineStyle = [CPTMutableLineStyle lineStyle];

gridLineStyle.dashPattern=[NSArray arrayWithObjects:[NSDecimalNumber numberWithInt:1],[NSDecimalNumber numberWithInt:2],[NSDecimalNumber numberWithInt:3],[NSDecimalNumber numberWithInt:4],[NSDecimalNumber numberWithInt:5],[NSDecimalNumber numberWithInt:6],[NSDecimalNumber numberWithInt:7],[NSDecimalNumber numberWithInt:8],nil];
于 2013-01-30T06:11:19.987 回答
5
于 2012-11-14T00:33:12.197 回答