Page 1 of 1

Using Logarithmic TrendFunction

Posted: Tue Nov 03, 2015 2:22 pm
by 9339158
Hi

I'm trying to draw a Line using the Logarithmic style TrendFunction but cannot get anything to display.

This is the code that I am using:

Code: Select all

TrendFunction logFunction = new TrendFunction();
logFunction.TrendStyle = TrendStyles.Logarithmic;
		
Line logLine = new Line(chartInstance.Chart) {Function = logFunction, DataSource = pointSeries};
logLine.Color = Color.Blue;

logLine.CheckDataSource();
Where pointSeries is a Series of type Points - I have ensured that all of the data values are > 0

With the code above, and the same series/data I can get a standard linear line drawing by removing the line of code that sets the TrendStyle to Logarithmic.

Have you any pointers as to what I may be missing? I'm getting no errors or exceptions, the line just simply doesn't appear.

Many Thanks

Re: Using Logarithmic TrendFunction

Posted: Wed Nov 04, 2015 10:00 am
by Christopher
Hello,
JonM wrote: Have you any pointers as to what I may be missing? I'm getting no errors or exceptions, the line just simply doesn't appear.
There is an example you can look at in the features demo which you can run from:
%programfiles(x86)%\Steema Software\Steema TeeChart for .NET 2015 4.1.2015.08060\Examples\DemoProject\bin\ExecutableDemo\TeeChartNetExamples.exe

Under the "All Features" tab -> Welcome !\Functions\Extended\Trendline

Re: Using Logarithmic TrendFunction

Posted: Wed Nov 04, 2015 3:23 pm
by 9339158
Thank you - that is exactly what I need.