wmorris20

Linear Regression On Line Charts

Recommended Posts

I understand linear regression is supported in XY and Bubble Charts. Do you anticipate this feature being supported in Line Charts in the future? I know there is a workaround by computing the regression line based on the data points and then using a trend line, but that is a little bit involved. Seems like it would be a good feature.

Share this post


Link to post
Share on other sites

I understand linear regression is supported in XY and Bubble Charts. Do you anticipate this feature being supported in Line Charts in the future? I know there is a workaround by computing the regression line based on the data points and then using a trend line, but that is a little bit involved. Seems like it would be a good feature.

 

I really should have explained this better. The x coordinates of the equation would be coming from something like the (total chart width / number of categories) * current count.

Share this post


Link to post
Share on other sites
Guest Sumedh

I understand linear regression is supported in XY and Bubble Charts. Do you anticipate this feature being supported in Line Charts in the future? I know there is a workaround by computing the regression line based on the data points and then using a trend line, but that is a little bit involved. Seems like it would be a good feature.

 

Hi,

 

To display the regression line in line chart, you can use scatter chart itself as a work-around.

 

Set drawLine attribute as "1" under the dataset element.

 

Also, set showRegressionLine attribute as "1" under the chart element.

 

Ref. Code:

<chart ... showRegressionLine="1">

<dataset ... drawLine="1">

.

.

.

</chart>

 

Please find attached screen-shot for your reference.

post-24802-0-89831500-1341556893_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

To display the regression line in line chart, you can use scatter chart itself as a work-around.

 

Set drawLine attribute as "1" under the dataset element.

 

Also, set showRegressionLine attribute as "1" under the chart element.

 

Ref. Code:

<chart ... showRegressionLine="1">

<dataset ... drawLine="1">

.

.

.

</chart>

 

Please find attached screen-shot for your reference.

 

Using a scatter or bubble chart will not work, because in a Line Chart the data points do not technically have a true x-coordinate. The x-coordinate could however be derived from the plotting of the data point once all of the categories are placed. I imagine within the core of FusionCharts you have xy coordinates even for Line Charts.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Line chart does not use x-y coordinates for plotting data.

 

If you want to display regression line for a Line chart, you would need to use scatter chart as a work-around.

Share this post


Link to post
Share on other sites

Hi,

 

Line chart does not use x-y coordinates for plotting data.

 

If you want to display regression line for a Line chart, you would need to use scatter chart as a work-around.

 

So, I guess your answer is no; it's not expected to be supported in the future?

Share this post


Link to post
Share on other sites
Guest Sumedh

So, I guess your answer is no; it's not expected to be supported in the future?

 

Hi,

 

This has been added to our feature wishlist.

 

We will try to add this feature, if it is feasible.

Share this post


Link to post
Share on other sites
Guest Sumedh

So, I guess your answer is no; it's not expected to be supported in the future?

 

Hey,

 

This feature is not feasible. So, this will not be added in the future releases.

 

Thanks for your time and support.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now