stper

Timeseries with trendlines

Recommended Posts

Hi everyone,

 

I am new to fusionChart and am taking back a developpement done by one of my colleague. He previsouly used a mspline type of chart which I transformed into a timeserie chart.

In his previous chart, he was using trendlines which were shown successfully on the graph. 

I have not changed the code of the generation of the trendlines but they do not appear in my timeserie chart anymore. Would anyone know why?

Maybe trendlines are not compatible with timeseries charts?

 

Thanks for your help.

 

 

Share this post


Link to post
Share on other sites

Hi,

 

The mspline is a supported chart type of FusionChartsXT product, and a timeseries is a chart type of FusionTime product.

You check the "Reference lines" feature of FT charts, which is similar to the trendlines feature of FC charts. Please check the below documentation link for reference to FT - Reference lines feature :

https://www.fusioncharts.com/dev/fusiontime/fusiontime-component/reference-line-in-fusiontime

Please note : FT and FC are separate products with different features and implementation ways.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hi Akash,

 

Indeed thanks a lot for your help. 

I am now struggeling to color the line. Dashed is ok, width is ok but I am not able to color the line itseld. I manage to color the dot at the end of the line but the line keeps being in red. 

Would you know why?

And is there a way to keep the label shown on the right of the chart as well?

Here is my code:

  yaxis[0].referenceLine.push({
    label: "Max",
    value: max.value,
    style: {
      marker: {
        "stroke-dasharray": "4 - 2",
        "stroke-width": 5,
        fill: "#17c01f",
      },
    },
  });
Edited by stper

Share this post


Link to post
Share on other sites

Hi again,

I found for the color of the line, it is the "stroke" value that was missing.

However, I still did not found how to display the values all the time and not only when hovering the reference line/zone.

 

Thanks,

Share this post


Link to post
Share on other sites

Hi,

 

You can customize the reference line, check the attribute list for the supported configurations : https://www.fusioncharts.com/dev/fusiontime/fusiontime-attributes#reference-lines

Also check this showcased sample with the dataSource below for reference : https://www.fusioncharts.com/fusiontime/examples/multiple-reference-lines-on-same-chart?framework=javascript

Also find a sample fiddle for reference : https://jsfiddle.net/92kjpguv/

 

Please note : The labels will be displayed when the notches of the reference lines are hovered over of a FT charts.

 

Thanks,

Akash.

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