我已经通过使用jQuery库Chartjs创建了非数字图表 https://www.chartjs.org/docs/latest/。
我想在工具提示文本中动态添加日期,时间,用户名,就像动态创建数据点的方式一样。
代码为
{
"to":"eB5papU2Xdc:APA91bFFvc3dXru1fN5JY8U19oHIpfGhPUx7Ll7v9vJYTsIGZ15mDwB2Wpep3flLK85IUqqs2WqJwjYHSDYX28oJ1wTP0R2TDc2ba_uVjUauDcp3pCNKr_0KlghOnS",
"notification" : {
"body" : "New announcement assigned",
"OrganizationId":"2",
"content_available" : true,
"priority" : "high",
"subtitle":"Elementary School",
"Title":"hello"
},
"data" : {
"priority" : "high",
"sound":"app_sound.wav",
"content_available" : true,
"bodyText" : "New Announcement assigned",
"organization" :"Elementary school"
}
}
jQuery
<canvas id="canvas"></canvas>
问题:是否可以像添加数据点一样动态添加工具提示文本?