为了账号安全,请及时绑定邮箱和手机立即绑定

如何在chartist.js脚本中使用laravel数组

如何在chartist.js脚本中使用laravel数组

森林海 2021-05-07 14:20:20
我的laravel数组的格式错误,Chartist.js脚本无法将其作为标签处理。因为我的标签是字符串(销售人员姓名),所以它们用引号引起来,并且从来没有被图表专家正确地阅读。我尝试将编码编码为json并将“替换为',但它们仍被读取为 " Sales Person "字符串值。数字工作正常,但是Chartist很难使用字符串。Laravel系列$advisors_raw = Paymentplan::distinct()->whereNotNull('owner')->orderBy('owner', 'asc')->pluck('owner');不会读取数组的Chartist脚本:new Chartist.Bar('#chart3', {  labels: [{{$advisors_raw}}],  series: [{{$pruchase_total_2019}}],});
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 159 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信