dygraph chart title set visiblilyty

时间:2017-07-24 08:57:01

标签: javascript jquery angularjs dygraphs

我需要隐藏我的dygraph标题,我不知道该怎么做..我搜索官方文档,没有任何结果。

对于标签不要修复我总是这样做" options.legend ='关注'"

有办法做到这一点吗?

我的选择:

var options = {
                        labels: labels,
                        showRangeSelector: true,
                        legend: 'always',
                        ylabel: controllerScope.dataLabels[dataLabelKey].units,
                        title: graphTitle,
                        axes: {
                            y: {
                                valueFormatter: function (value, opts, seriesName, dygraph, row, col) {
                                    if (seriesName == "Mode") {
                                        return modemMode[value];
                                    } else if (seriesName == "Submode") {
                                        return modemSubmode[value];
                                    } else if (seriesName == "Sysmode") {
                                        return modemSysmode[value];
                                    } else if (seriesName == "Roaming") {
                                        return modemRoaming[value];
                                    } 
                                    return value;
                                }                               
                            }
                        },
                        underlayCallback: function(canvas, area, g) {

                            for (var i=0; i<highlightArea.length; i++) {
                                var left = g.toDomXCoord(highlightArea[i][0]);
                                var right = g.toDomXCoord(highlightArea[i][1]);

                                canvas.fillStyle = "rgba(217, 101, 87, 0.2)";
                                canvas.fillRect(left, area.y, right - left, area.h);
                            }
                        }
                    }

0 个答案:

没有答案