使用动态数据创建莫里斯折线图

问题描述 投票:0回答:1

我需要创建一个折线图,以显示一天,一周或一个月中每个商店的订单总数。

每月返回数据:

January, Store1, 80
January, Store2, 90
January, Store3, 50
February, Store1, 80
February, Store2, 90
February, Store3, 50
March, Store1, 80
March, Store2, 90
March, Store3, 50

并且商店名称是动态的。

需要使用]创建折线图>

xkey:month(January-December)

ykeys:['store1 value','store2 value','store2 value']

labels: ['store1','store2','store2']` -> dynamic stores depends on the merchant

请帮助我。谢谢。

我需要创建一个折线图,以显示一天,一周或一个月中每个商店的订单总数。每月返回数据:1月,Store1,1月80日,Store2,1月90日,Store3,2月50日,Store1,...

jquery arrays morris.js linegraph
1个回答
0
投票

当要显示新的数据集时,可以使用功能.setData()

© www.soinside.com 2019 - 2024. All rights reserved.