Skip to main content
17-Peridot
Mar 4, 2024 12:47 PM UTC
Solved

Linnear regression in scatter plot

Hello Community,

 

I was wondering if there is any way of "showing" linnear regression in a chart line?

I can only find the "HideLines" property on the line chart (scatter plot type) widget.

 

Here is an example using the g2plot library for further explanation:  https://g2plot.antv.antgroup.com/en/examples/scatter/scatter/#line

 

Regards,

Jens C

Rocko
RockoAnswer
19-Tanzanite
Mar 19, 2024 5:01 PM UTC

Jens, I have to roll back. Combo Chart isn't what I thought it was 😞 I was misled by the picture in the help, but you can't a line chart and a scatter plot into the same chart with it, sorry.

8 replies

Rocko
19-Tanzanite
Mar 4, 2024 1:07 PM UTC

Hi Jens, is the goal to show the points and the regression line in one chart?

Then you would have to use the Combo Chart, if your version already has it. The Line chart widget can only show splines.

In the combo chart, you would have to provide the data for the regression line as well as the chart won't compute this on its own.

Translate
jensc17-PeridotAuthor
17-Peridot
Mar 4, 2024 1:13 PM UTC

Hello @Rocko,

 

Yes, essentially I think that is what we would like.
Like this:

jensc_0-1709557847716.png

I did have a look in the Combo Chart documentation you linked, and the screenshot there doesn't exactly look like what we'd like. But perhaps we can work with it.
However, my 9.3.8 platform does not seem to include this widget... Is it something additional we need to install?

 

Regards,

Jens C.

 

Translate
Rocko
19-Tanzanite
Mar 4, 2024 1:16 PM UTC

I'm afraid it's a feature of TWX 9.4+ only...

Translate