Calculating the Function Value Using the Calculate Method

As an alternative to the use of either a code string or events, the programmer may specify an instance of an object that implements C1.Win.C1Chart.ISimpleFunction interface. Such an object must inherit from the interface and implement a public function name, Calculate. The method, Calculate takes the independent variable (Double) as a parameter and returns the dependent variable (Double).

For the YFunction class objects, the CustomFunction property must be set to the ISimpleFunction implementation object. For the ParametricFunction class object, the CustomFunctionX and CustomFunctionY properties must be set to appropriate objects implementing the ISimpleFunction interface.

      Visual Basic

      C#


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.