如何隐藏chart.js中显示的x轴标签/文本?
设置scaleShowLabels:false仅删除y轴标签.
<script>
var options = {
scaleFontColor: "#fa0",
datasetStrokeWidth: 1,
scaleShowLabels : false,
animation : false,
bezierCurve : true,
scaleStartValue: 0,
};
var lineChartData = {
labels : ["1","2","3","4","5","6","7"],
datasets : [
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
data : [1,3,0,0,6,2,10]
}
]
}
var myLine = new Chart(document.getElementById("canvas").getContext("2d")).Line(lineChartData,options);
</script>
Run Code Online (Sandbox Code Playgroud) 自从我升级到OSX 10.9 Mavericks以来,我一直在收到这个错误.谁能告诉我发生了什么?该应用程序不会崩溃但我每次编译时都会遇到这个恼人的错误.有没有办法来解决这个问题?
ibtoold(2546,0x11208c000) malloc: *** auto malloc[2546]: error: GC operation on unregistered thread. Thread registered implicitly. Break on auto_zone_thread_registration_error() to debug.Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool emitted errors but did not return a nonzero exit code to indicate failure
/ibtoold(2546,0x11208c000) malloc: GC operation on unregistered thread. Thread registered implicitly. Break on auto_zone_thread_registration_error() to debug.
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool emitted errors but did not return a nonzero exit code to indicate failure
Run Code Online (Sandbox Code Playgroud) 我有一个带有 NSStrings 的 NSObject。如何仅将具有唯一 obj.name 的对象添加到 NSMutableArray?我试过 NSOrderedSet 但它只有在你将 NSString 添加到数组而不是包含 NSString 的对象时才有效。
例子。
@@interface MyObject : NSObject
@property (strong, nonatomic) NSString *name;
@end
NSMutableArray *array = {MyObject.name,MyObject.name,MyObject.name};
Run Code Online (Sandbox Code Playgroud)
如何确保没有两个 MyObject 具有相同的名称?
我使用的是一个库(SGInfoAlert),它使用了弃用的代码drawInRect:r withFont:.我尝试更改一些代码以在iOS 7中修复它,但文本没有显示.谁知道为什么会这样?
// Changed this
//[info_ drawInRect:r withFont:[UIFont systemFontOfSize:kSGInfoAlert_fontSize]];
// To this
NSDictionary *textAttributes = @{NSFontAttributeName: [UIFont systemFontOfSize:kSGInfoAlert_fontSize]};
[info_ drawInRect:r withAttributes:textAttributes];
Run Code Online (Sandbox Code Playgroud)
chart.js ×1
charts ×1
deprecated ×1
drawinrect ×1
filter ×1
html5 ×1
ios ×1
ios7 ×1
javascript ×1
nsorderedset ×1
unique ×1
xcode4.6.3 ×1