/// <summary> /// The sine function. /// </summary> public float CalculateFunction(float xVal, MindFusion.Charting.FunctionArgs e) { return (float)Math.Sin((double)xVal); }
// ...
// Create the chart MindFusion.Charting.LineChart chart = new MindFusion.Charting.LineChart(MindFusion.Charting.LineTypes.Line);
// Add the delegate chart.CalculateFunction = new MindFusion.Charting.CalculateFunctionDelegate(CalculateFunction);
// Set the interval of calculation chart.FunctionArguments = new MindFusion.Charting.FunctionArgs(-3, 3); |