2

I am adding data to scatter series like below , how do we receive the custom parameter value I add here

series.add({
      x: 0,
      y: 22,
      color: ColorRGBA(255, 0, 0),
      size: 10,
      rotation: 45,
      value: "custom message",
    });

From the above series how do I extract the value "custom message" .. basically is there anyway to get it ? so I can to use it in table formatter like below .

series.setCursorResultTableFormatter((builder, series, xValue, yValue,value) => {
        return builder.addRow(value).addRow(series.getValue());
      });

Also another doubt is can we change shape of series dynamically like we change color and size ?

Gracie williams
  • 1,287
  • 2
  • 16
  • 39

1 Answers1

1

With v.3.1 this kind of logic is not supplied out of the box. To implement it you'd need to add some kind of custom logic which finds your custom data based on the X and Y information.

In next release, v.3.2 we'll add an extra parameter to cursor result table formatters, so you can use it like follows:

series.setCursorResultTableFormatter((builder, series, x, y, dataPoint) => {
    // `dataPoint` has all same information as user supplied, size, rotation, value or anything.
    return builder.addRow(x).addRow(y).addRow(dataPoint.value);
});

Please note that these custom properties (size, rotation, value, etc.) will only be included when cursor interpolation is disabled.

At this time v.3.2 is scheduled for late September, but this could change.

2nd question about changing shape of point series, we currently don't have active plans to change this, but when there is enough motivation it will be improved on.

Niilo Keinänen
  • 2,187
  • 1
  • 7
  • 12