Pentaho如何在折线图中输入数据?

How input data in line chart in Pentaho?

我想在 Pentaho CDE 中制作这张图表:
基于此图表(我认为这是 CCC 组件中最相似的):
(代码在这个link.)

但我不知道如何调整我的数据输入以适应该图表。 例如,我想使用这种格式的数据:

[Year, customers_A, customers_B, cars_A, cars_B]
[2014, 8, 4, 23, 20]

[2015, 20, 6, 30, 38]

如何在此图表中输入我的数据?

您的数据应该以这样的对象形式出现:

data = {
  metadata: [
    { colName: "Year", colType:"Numeric", colIndex: 1},
    { colName: "customers_A", colType:"Numeric", colIndex: 2},
    { colName: "customers_B", colType:"Numeric", colIndex: 3},
    { colName: "cars_A", colType:"Numeric", colIndex: 4},
    { colName: "cars_B", colType:"Numeric", colIndex: 5}
  ],
  resultset: [
    [2014, 8, 4, 23, 20],
    [2015, 20, 6, 30, 38]
  ],
  queryInfo: {totalRows: 2}
}