Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 剑道散线图注释_Jquery_Charts_Kendo Ui_Scatter Plot - Fatal编程技术网

Jquery 剑道散线图注释

Jquery 剑道散线图注释,jquery,charts,kendo-ui,scatter-plot,Jquery,Charts,Kendo Ui,Scatter Plot,我试着把笔记传给剑道散点图 $("#chart").kendoChart({ dataSource: { data: [{ value: 1, noteText: "A", xField: 10 }, { value: 1, noteText: "A", xField: 12 }, { value: 1, xField

我试着把笔记传给剑道散点图

$("#chart").kendoChart({
  dataSource: {
    data: [{
      value: 1,
      noteText: "A",
      xField: 10
    },
           {
      value: 1,
      noteText: "A",
      xField: 12
    },
           {
      value: 1,      
      xField: 4
    },
           {
      value: 1,      
      xField: 4,
noteText: "A"             
    },
           {
      value: null,      
      xField: 2,
      noteText: "EventIndicator"             
    }]
  },
  seriesDefaults: {
    type: "scatterLine",
    noteTextField: "noteText"//,
                   // notes: {
                     //   label: {
                    //        visible: false
                    //    },
                    //    icon: {
                    //        size: 0,
                    //        visible: false,
                    //    },
                   //     line: {
                    //        length: 0,
                     //       width: 0,
                   //     },
                  //  }
  },
  series: [{   
    xField: "xField",
    yField: "value",
    noteTextField: "noteText"
  }]
});

我可以根据我的代码获取笔记。这里的特殊要求是我必须画一个没有数据点的注释。如果您可以看到其中一个数据点,我将值传递为null。所以散线图并没有使用null来绘制给定xaxis值的注释。所以我需要一个办法来解决这个问题。即使有办法,我可以传递笔记除了这个。我严格地寻找散线图只。请告诉我是否有人知道解决方法…

您可以使用marker visual属性隐藏包含noteText的标记:

markers: {
    visual: function (e) {
      if (e.dataItem.noteText){
          return;
      } else {
          return e.createVisual();
      }
    }
  },

如果您实际上不希望线条穿过该点,而只想要注释,则可以将第二个系列设置为“分散”(无线条),并使用视觉效果隐藏标记