Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories Visualization
Created by Guest
Created on Dec 17, 2019

Lines and curves: Add Average Curve that is average of all categories and is Dynamic to current Filter and Marking

There should be option in the 'lines and curves' to add an average line (curve) that will:

1. Auto-fit to the current data set OR

2. Following the filter and marked data AND

3. User-adjustable as to what the average line is based on.

The propose is to have a dynamic reference line to help users locating the mean at any point on a complex graph.

Example: For a line chart with say, Sales(Y-axis) per product category(color) over time(on X-axis), I want to add an additional line which is the average over time for all product categories together.

  • Attach files
  • Admin
    Niklas Amberntsson
    Reply
    |
    Jan 21, 2020

    Ziyang, I agree this should be easier and better supported. I have slightly modified the description to capture our discussion. Thanks for you help.

  • Guest
    Reply
    |
    Jan 14, 2020

    Good Morning,

    I see, the subsets method won't work as it doesn't work with filtering. 

    As for using the expressions, the legend is quite annoying and more importantly lacks the edibility like 'lines and curves' i.e. Different style of lines, independent thickness, labeling, and transparency etc...

    Anyways, the reason I'm here is that I thought this should be a standard built-in function. This is a professional software with all the fancy curve fits already but does not have a simple and basic average curve?

    Regards,

    Ziyang

  • Admin
    Niklas Amberntsson
    Reply
    |
    Jan 14, 2020

    Ok, now I get it. It is possible to do this in Spotfire, but perhaps not a perfect solution. See the new attached file for two options to solve it. Let me know if this works for you.

  • Guest
    Reply
    |
    Jan 13, 2020

    Hi Niklas,

    I saw the example file, what I'm asking is to have an average curve from all data lines for each X value. So for the case of this sample file, the average curve should be changing between the red and blue for every mouth. Not just a straight line.

    Thanks!

  • Admin
    Niklas Amberntsson
    Reply
    |
    Jan 13, 2020

    Hi again Ziyang, perhaps I am still not understanding your exact need... or perhaps it is already possible? I have attached a DXP file that shows how I interpreted your question, let me know if it solves your issue?

  • Guest
    Reply
    |
    Jan 9, 2020

    Yes! That's it, thanks.

  • Admin
    Niklas Amberntsson
    Reply
    |
    Jan 7, 2020

    Ok, so for a line chart with say, Sales(Y-axis) per product category(color) over time(on X-axis), you want to add an additional line which is the average over time for all product categories together? Did I get that right?

  • Guest
    Reply
    |
    Jan 6, 2020

    Hi Niklas,

    Thanks for replying, I was able to get an average line on the filtered data set.

    What I was asking is to have the ability to draw an average curve that is based on filtered Y values for each X value.

    I know Spotfire will give a single average line if no differentiation method (line by or color by) was set for a set of different Y values. I just want to have this in the 'lines and curves' so that I can add an average curve to any 'messy' graph.

    i.e.: A average line that shows the trend of a set of Y value lines. Therefore aid in the understanding of the average overall trend on any graph with multiple lines.

  • Admin
    Niklas Amberntsson
    Reply
    |
    Jan 2, 2020

    Dear Ziyang, thanks for contributing. The default in Spotfire is that an average line created through lines and curves is dynamic with respect to filtering and data limiting. Is your proposal to be able to create a reference line that is (optionally) not based on the filtered data in the plot but rather based on the entire data set? Any example DXP or screenshot that may help us understanding the details of your needs is appreciated.