How to make Scatter chart with Airtable

Hi there.
I’m trying to make Scatter chart with my Airtable’s data.
For example, my JSON is following:

{
  type: 'scatter',
  data: {
    datasets: [
      {
        label: 'xdata',
        backgroundColor: 'rgb(255, 99, 132)',
        borderColor: 'rgba(255, 99, 132, 0.2)',
        fill: false,
      },
    ],
  },
  options: {
    plugins: {
      airtable: {
        apiKey: 'myapikey',
        url: 'myurl',
        labelField: 'xdata',
        dataFields: ['ydata',],
      },
    },
  },
}

However chart is not generated.
Maybe, ‘dataFields’ format is wrong, I think. But I have no idea.
How to generate a scatter chart with Airatable’s data on QuickChart API?

I’m sorry for my poor English.

Best regards.

Hi @chihiro,

Thank you for bringing this issue to my attention. We’ve deployed a change that allows Airtable data to be in JSON format, not just a single number. For example:

{"x": 10, "y": 20}

This should allow you to create a scatter chart. Can you give it a try and let me know if you have any issues?

Thank you for the reply.

You mean this?

... ...
options: {
    plugins: {
      airtable: {
        apiKey: 'myapikey',
        url: 'myurl',
        labelField: 'xdata',
        dataFields: [{"x": 'xdata', "y": 'ydata'}],
      },
    },
  },
}

It doesn’t work.
// xdata & ydata are Airtables’s column.
Where do I write Airtable data?

Hi @chihiro, the Airtable field itself will have to be in JSON format. Then you can specify dataFields: ['jsonField']. Please give that a try and let me know how it works.