public string [] ValueAxisDataSourceTicksForValueAxis (NChartValueAxis axis) { // Choose ticks by the kind of axis. switch (axis.Kind) { case NChartValueAxisKind.X: // Return five tick names, because we have five points in the series. return new string[] { "Alpha", "Beta", "Gamma", "Delta", "Epsilon" }; case NChartValueAxisKind.Z: // Return an array with an empty string to draw noting on the single tick of Z-Axis. return new string[] { "" }; default: // We do not have other axes. return null; } }
public string [] ValueAxisDataSourceTicksForValueAxis (NChartValueAxis axis) { // Choose ticks by the kind of axis. switch (axis.Kind) { case NChartValueAxisKind.X: // Return 10 ticks for the X-Axis representing, let us say, years. List<string> result = new List<string> (); for (int i = 2000; i < 2010; ++i) result.Add (string.Format ("{0}", i)); return result.ToArray (); default: // We do not have other axes. return null; } }
public NSNumber Step(NChartValueAxis axis) { return(null); }
public NSNumber Length(NChartValueAxis axis) { return(null); }
public string [] ExtraTicks(NChartValueAxis axis) { return(null); }
public Number DateStep(NChartValueAxis nChartValueAxis) { return(null); }
public string[] Ticks(NChartValueAxis nChartValueAxis) { return(null); }
public string Name (NChartValueAxis nChartValueAxis) { return null; }
public string ValueAxisDataSourceNameForAxis (NChartValueAxis axis) { return null; }
public NSNumber ValueAxisDataSourceStepForValueAxis (NChartValueAxis axis) { return null; }
// If you don't want to implement method, return null. public string ValueAxisDataSourceDouble (double value, NChartValueAxis axis) { return null; }
public NSNumber ValueAxisDataSourceLengthForValueAxis (NChartValueAxis axis) { // Choose length by the kind of axis. switch (axis.Kind) { case NChartValueAxisKind.Z: // We want Z-Axis to be shorter than the others because it has no values. The default length of axes is 1.0. // So let Z-Axis be 0.3 for example. return NSNumber.FromFloat (0.3f); default: // All other axes should have the default length. return null; } }
public string [] ValueAxisDataSourceTicksForValueAxis (NChartValueAxis axis) { // Get names for the X-Axis ticks. return new string[] { "Alpha", "Beta", "Gamma", "Delta", "Epsilon" }; }
public Number Length (NChartValueAxis nChartValueAxis) { if (nChartValueAxis.Kind.Ordinal () == NChartTypes.ValueAxisKind.Z.Ordinal ()) // We want Z-Axis to be shorter than the others because it has no values. The default length of axes is 1.0. // So let Z-Axis be 0.3 for example. return (Java.Lang.Double)0.3; else // All other axes should have the default length. return null; }
public Number Min(NChartValueAxis axis) { return(null); }
public string DoubleToString (double v, NChartValueAxis nChartValueAxis) { return null; }
public string[] Ticks (NChartValueAxis nChartValueAxis) { // Choose ticks by the kind of axis. if (nChartValueAxis.Kind.Ordinal () == NChartTypes.ValueAxisKind.X.Ordinal ()) // Return 10 ticks for the X-Axis representing, let us say, 10 years. return new string[] { "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009" }; else // Other axes have no ticks. return null; }
public Number Max(NChartValueAxis nChartValueAxis) { return(null); }
public Number Length (NChartValueAxis nChartValueAxis) { return null; }
public Date MaxDate(NChartValueAxis nChartValueAxis) { return(null); }
public string DateToString(NSDate date, double value, NChartValueAxis axis) { return(null); }
public string DateToString(Date nDate, double v, NChartValueAxis nChartValueAxis) { return(null); }
public Number Max (NChartValueAxis nChartValueAxis) { return null; }
public string DoubleToString(double value, NChartValueAxis axis) { return(null); }
public Number Step (NChartValueAxis nChartValueAxis) { return null; }
public string Name(NChartValueAxis axis) { return(null); }
public string[] Ticks (NChartValueAxis nChartValueAxis) { // Choose ticks by the kind of axis. if (nChartValueAxis.Kind.Ordinal () == NChartTypes.ValueAxisKind.X.Ordinal ()) // Return five tick names, because we have five points in the series. return new string[] { "Alpha", "Beta", "Gamma", "Delta", "Epsilon" }; else if (nChartValueAxis.Kind.Ordinal () == NChartTypes.ValueAxisKind.Z.Ordinal ()) // Return an array with an empty string to draw noting on the single tick of Z-Axis. return new string[] { "" }; else // Other axes have no ticks. return null; }
public NSDate MinDate(NChartValueAxis axis) { return(null); }
public NSNumber ValueAxisDataSourceStepForValueAxis (NChartValueAxis axis) { // Choose step by the kind of axis. switch (axis.Kind) { case NChartValueAxisKind.SY: // We want SY-Axis to have a custom step value. return NSNumber.FromFloat (11.0f); default: // All other axes should have the step calculated. return null; } }