YAxisLabelProvider.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using SciChart.Charting.Visuals.Axes.LabelProviders;
  3. namespace MECF.Framework.UI.Client.CenterViews.DataLogs.WaferHistory
  4. {
  5. public class YAxisLabelProvider : LabelProviderBase
  6. {
  7. //public string[] LabelList { get; set; }
  8. private readonly string[] LabelList = { "Unload", "HotN2", "QDR2", "AP7990-2", "QDR1", "AP7990-1", "C/C", "Load" };
  9. public override string FormatLabel(IComparable dataValue)
  10. {
  11. var i = Convert.ToInt32(dataValue);
  12. int len = LabelList.Length;
  13. string result = "";
  14. if (i >= 0 && i < len)
  15. {
  16. result = LabelList[i];
  17. }
  18. return result;
  19. }
  20. public override string FormatCursorLabel(IComparable dataValue)
  21. {
  22. var i = Convert.ToInt32(dataValue);
  23. string result = "";
  24. if (i >= 0 && i < LabelList.Length)
  25. {
  26. result = LabelList[i];
  27. }
  28. else
  29. {
  30. result = string.Empty;
  31. }
  32. return result;
  33. }
  34. }
  35. }