相关疑难解决方法(0)

flot graph,使用图例打开/关闭系列

我希望能够使用flot图形的图例来打开/关闭我的图形系列.我在flot网站上找到了这些例子,并使用了Turning系列的开/关和API格式的Labelformatter来构建我现在拥有的东西.我可以在图例元素旁边放置复选框,并为它们及其火灾添加一个点击事件.但是它再次调用了plot函数并重置了我的复选框值.我已经包含了完整的jquery函数,抱歉它有点长.

<script id="source">
var jsonPath = "JsonPriceHistory/" + getParameterByName("CardId")



$(function () {
    $.getJSON(jsonPath, function (results) {

        results = [{ "label": "A", "data": [[1290115114240, 0.7000], [1289396258877, 0.7000], [1289394738247, 0.7000], [1288482602563, 0.7000], [1288479321830, 0.7000], [1288464257267, 0.7000], [1288463414413, 0.7000], [1268440264933, 1.0000], [1268434766653, 1.0000], [1268059707567, 1.0000], [1265934534340, 1.0000]] }, { "label": "B", "data": [[1290115102033, 6.0000], [1289395956947, 6.0000], [1289394743117, 6.0000], [1288482613967, 6.0000], [1288479332767, 6.0000], [1288464270420, 6.0000], [1288463427313, 6.0000], [1268440276413, 6.0000], [1268434778203, 6.0000], [1268059732683, 6.0000], [1265934545390, 6.0000]] }, { "label": "C", "data": [[1290115034640, 0.3000], …
Run Code Online (Sandbox Code Playgroud)

javascript jquery graph flot

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

flot ×1

graph ×1

javascript ×1

jquery ×1