Sencha Touch JSON Format

前端 未结 1 1932
挽巷
挽巷 2021-01-28 18:51

I\'m trying to input a JSON file with the following format:

[{\"target\": \"stats.server14\", \"datapoints\": [[0.0, 1340034660], [0.016666666666666666,

1条回答
  •  失恋的感觉
    2021-01-28 19:32

    Whatever value you pass into the datapoints field automatically gets converted to a string, because you gave it type "string". Remove this part (i.e. leave the whole type: "string" out of the datapoints line).

    This should give you datapoints that are closer to what you want. If it's not entirely what you want, you can tweak the datapoints by using the convert function, see Ext.data.Field.

    0 讨论(0)
提交回复
热议问题