我有以下数据:
<rect fill="green" width="0.0000028312475887345677"
x="-0.0000014156237943672838" height="81.66666666666667" y="0">
</rect>
我正在尝试使用Plottable.Plot.Rectangle创建一个热图,其代码如下:
//get video byte[], tested that it doesn't lose metadata uploading 360 photo
RandomAccessFile f = new RandomAccessFile(file.getAbsolutePath(), "r");
byte[] b = new byte[(int)f.length()];
f.read(b);
//set upload params
Bundle params = new Bundle();
params.putByteArray("video.mp4", b);
params.putString("title", file.getName());
//create and init request
GraphRequest graphRequest =
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"me/videos",
params,
HttpMethod.POST,
new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
if(response.getRawResponse() == null){
Log.e("UploadServiceParentFB", "fail to upload");
showNotificationError(getResources().getString(R.string.no_permissions));
}
else {
file.delete();
showNotification();
Log.d("UploadServiceParentFB", "" + response.getRawResponse());
}
}
});
graphRequest.executeAndWait();
然而,它只是创建宽度为0的rects,因此某些东西在x轴(日期)上不起作用:
str = "a,b,c,d,e,f,g"
str = str .. ','
for w in str:gmatch("(.-),") do print(w) end
答案 0 :(得分:0)
似乎你必须指定.x2(),例如
.x2(function (d) {
return new Date().setHours(d.date.getHours() + 8);
}, xScale)