在一个 VizFrame 中显示折线图和散点图

Show line chart and scatter chart in one VizFrame

我有 VizFrame 散点图,我需要在其中添加一些用线表示的数据。我试图通过添加参考线 (plotArea.referenceLine.line), but it looks like the input can be just one value for this property, so the reference line is always perpendicluar one the axis (please see example) 来做到这一点。

我想添加为一行的数据保存在 "Line" 名称下:

var oData =  [
                {                     
                    "Z": "A",
                    "X": 171.9,
                    "Y": 183,
                    "Line": 176.7
                },
                {                    
                    "Z": "B",
                    "X" : 144.3,
                    "Y": 158.6,
                    "Line": 163.3
                },
             //....and so on, more in the example
}]; 

有什么方法可以同时显示折线图和散点图VizFrame

VizFrame 支持 "combined" 图表。不幸的是,我不认为你可以结合散点图和折线图。从这里查看我的回答:.

  • You cannot add "oblique" reference lines (= the trend line) to the chart. You can only add vertical / horizontal ones via the Reference Line feature. Check out the (non-intuitive) documentation on this: Viz Charts Documentation (look at the plotArea.referenceLine.line; it is just a number = will be a horizontal / vertical line depending on your chart type or orientation).
  • You cannot combine a scatter plot with a line chart. If you look in the same Viz Charts Documentation, you will see that in the Combination "chapter" on the left hand side, there is no "Line - Scatter" combination.