在一个 VizFrame 中显示折线图和散点图 [英] Show line chart and scatter chart in one VizFrame

查看:32
本文介绍了在一个 VizFrame 中显示折线图和散点图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 VizFrame 散点图,我需要在那里添加一些由线表示的数据.我试图通过添加参考线(plotArea.referenceLine.line),但看起来输入可能只是此属性的一个值,因此参考线始终垂直于轴(请参阅示例).

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

有什么方法可以在一个 VizFrame?

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

推荐答案

VizFrame 支持组合"图表.不幸的是,我认为您不能将散点图和折线图结合起来.从这里查看我的回答:https://stackoverflow.com/a/43014985/7612556.

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.

  • 您不能向图表添加倾斜"参考线(= 趋势线).您只能通过 参考线 功能.查看关于此的(非直观)文档:可视化图表文档(查看 plotArea.referenceLine.line;它只是一个数字 = 将是水平/垂直线,具体取决于您的图表类型或方向).
  • 您不能将散点图与折线图结合使用.如果您查看相同的 Viz Charts Documentation,你会看到在左侧的组合章节"中,没有线 - 散点"组合.
  • 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.

这篇关于在一个 VizFrame 中显示折线图和散点图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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