AnyChart - TextTemplate Query

0
Hi, I’m using the AnyChart plugin and have successfully hooked up the x and y values following the guide. I am now trying to use the Texttemplate field in the Layout configuration to pull in a separate calculated value along with the data string that is pulled into the source attribute. So I have: [{ "x" : ["Test"], "y" : [ 1 ], "z" : [ 2 ] }] As my data structure, and I’m wanting to pull my ‘z’ values into my Texttemplate field to display a label on the graph. This works if I use ‘x’ and ‘y’, but not for ‘z’.   Any ideas?   Many Thanks, Dan
asked
2 answers
0

Hey 

If you want to add text to your values then, you need add a array of texts equal to number of values, then the texts will appear on each value,example:

[{
      "uid": "7838af2e-4ea3-4aa6-bfe6-b76bbcca20e5",
      "mode": "lines+markers+text",
      "name": "ARP3",
      "type": "scatter",
      "x": [
        1,
        2,
        3
      ],
      "y": [
        2,
        3,
        3
      ],
      "marker": {
        "size": 20
      },
      "text": [
        "2",
        "3",
        "3"
      ]
    }
  ]

 

answered
0

My guess is you need to use another chart type, scatter might not support the  ‘z’ reference. Z is normally associated with a 3D chart. Are you using a 3d chart or a second Y axis? In the last case, use ‘y2' instead.

answered