Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Problem with spline chart
posted

Problem is Spline and Spline Area charts show data where data values are zero

using version Version : 18.2.20182.175 

I have verified this with the ChartTypes sample program and assigning a different Data class configured like so: 

public class DateUse
{
 public string Date { get; set; }
 public double Nuclear { get; set; }
 public double Coal { get; set; } 
 public double Oil { get; set; }
 public double Gas { get; set; }
 public double Hydro { get; set; }
 public double Renewable { get; set; }
 public double NonRenewable { get; set; }

}
class EnergyUseByDate : ObservableCollection<DateUse>
{
public EnergyUseByDate()
{
this.Add(new DateUse() { Date = "Jan", Nuclear = 0, Coal = 0, Oil = 0, Gas = 0, Hydro = 0, Renewable = 0, NonRenewable = 0 });
this.Add(new DateUse() { Date = "Feb", Nuclear = 0, Coal = 0, Oil = 0, Gas = 0, Hydro = 0, Renewable = 0, NonRenewable = 0 });
this.Add(new DateUse() { Date = "Mar", Nuclear = 475, Coal = 550, Oil = 200, Gas = 250, Hydro = 425, Renewable = 425, NonRenewable = 1475 });
this.Add(new DateUse() { Date = "Apr", Nuclear = 0, Coal = 0, Oil = 0, Gas = 0, Hydro = 0, Renewable = 0, NonRenewable = 0 });
this.Add(new DateUse() { Date = "May", Nuclear = 0, Coal = 0, Oil = 0, Gas = 0, Hydro = 0, Renewable = 0, NonRenewable = 0 });
this.Add(new DateUse() { Date = "Jun", Nuclear = 0, Coal = 0, Oil = 0, Gas = 0, Hydro = 0, Renewable = 0, NonRenewable = 0 });
this.Add(new DateUse() { Date = "Jul", Nuclear = 0, Coal = 0, Oil = 0, Gas = 0, Hydro = 0, Renewable = 0, NonRenewable = 0 });

}
}

The Spline and Spline area shows a clear  "bump" for all types in May and June  also the hover tip shows the data = 0

Parents
No Data
Reply
  • 28925
    Offline posted

    Hello Stephen, 

    The chart will always render points at zero, you'd have to interpolate the values. However unlike our other series, eg. Line, which exposes an UnknownValuePlotting property that you can set to LinearInterpolate, the Spline series doesn't support interpolating values when the values are null or double.nan. So even if you converted the zeros to double.nan the spline won't plot those values. 

    I recommend submitting a new product idea to allow the Spline series to interpolate unknown values.

    You can suggest new product ideas for future versions (or vote for existing ones) at <https://www.infragistics.com/community/ideas>.
    Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
    Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.

    Let me know if you have any questions.

    Michael DiFilippo
    Software Developer
    Infragistics, Inc.

Children
No Data