去除棉签中的标签 [英] remove labels in flot

查看:91
本文介绍了去除棉签中的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个相同的图形.这不是必需的. 以下是输入代码:

i have two same graph.i want to remove the label from the second one as it is not required. below is the code for input:

var d =
                 [
                     {
                         "label": "ABSOLUTE RETURN", "data": [[18, 40], [19, 20], [20, 100], [21, 100], [22, 100],
                           [23, 100], [24, 100], [25, 100], [26, 100], [27, 100], [28, 100], [29, 100], [30, 100],
                           [31, 50], [32, 40], [33, 60], [34, 70], [35, 40], [36, 100], [37, 100], [38, 100],
                           [39, 100], [40, 100], [41, 100], [42, 100], [43, 100], [44, 100], [45, 100], [46, 100], [47, 100]], "color": "#395A85"
                     }, {
                         "label": "EMERGING MARKETS EQUITY (MGI)", "data": [[18, 30], [19, 20], [20, 0], [21, 0],
                             [22, 0], [23, 0], [24, 0], [25, 0], [26, 0], [27, 0], [28, 0], [29, 0],
                             [30, 0], [31, 50], [32, 20], [33, 0], [34, 0], [35, 0], [36, 0], [37, 0],
                             [38, 0], [39, 0], [40, 0], [41, 0], [42, 0], [43, 0], [44, 0], [45, 0],
                             [46, 0], [47, 0]], "color": "#6EAA38"
                     }, {
                         "label": "ACTIVE GLOBAL EQUITY (MGI) HEDGED VERSION", "data": [[18, 30], [19, 80], [20, 0], [21, 0], [22, 0],
                             [23, 0], [24, 0], [25, 0], [26, 0], [27, 0], [28, 0], [29, 0], [30, 0], [31, 0], [32, 20], [33, 20], [34, 40],
                             [35, 0], [36, 0], [37, 0], [38, 0], [39, 0], [40, 0], [41, 0], [42, 0], [43, 0], [44, 0], [45, 0], [46, 0], [47, 0]], "color": "#00A8C8"
                     }];

碎石球中有3个标签.我不想在第二张图中标注.有没有特定的属性?

in scree shot there are 3 labels. i do not want label in second graph. there is any specific property for that?

推荐答案

将其添加到第二个图表的选项中:

Add this to the options for the second chart:

    legend: {
        show: false   
    },

请参阅此更新的小提琴.

这篇关于去除棉签中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆