1

在我的 StockChart 中,我想选择所有数据集,但它只是绑定了第一个数据集项(Anadolu YK)。

我该怎么做才能选择其他人?(Avrupa YK) (布尔萨) (安塔利亚)..

JsFiddle 示例

 dataSets: [{
            title: "Anadolu YK",
            fieldMappings: [{
                fromField: "value",
                toField: "value"
            }, {
                fromField: "volume",
                toField: "volume"
            }],
            dataProvider: chartData1,
            categoryField: "date"
        },

          {
              title: "Avrupa YK",
              fieldMappings: [{
                  fromField: "value",
                  toField: "value"
              }, {
                  fromField: "volume",
                  toField: "volume"
              }],
              dataProvider: chartData2,
              categoryField: "date"
          },
4

1 回答 1

2

要预先选择数据集,请将其compared属性设置为true

{
  title: "Avrupa YK",
  fieldMappings: [ {
    fromField: "value",
    toField: "value"
  }, {
    fromField: "volume",
    toField: "volume"
  } ],
  dataProvider: chartData2,
  categoryField: "date",
  compared: true
}
于 2015-11-06T14:01:24.870 回答