0
votes

I have VizFrame scatter chart and I need to add there some data represented by line. I was trying to do this by adding reference line (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).

The data I would like to add as a line are saved under the "Line" name:

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
}]; 

Is there any way how to show line chart and scatter chart in one VizFrame?

1

1 Answers

0
votes

The VizFrame supports "combined" charts. Unfortunately, I don't think that you can combine scatter and line charts. Check our my answer from here: https://stackoverflow.com/a/43014985/7612556.

  • 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.