protected override void ArrangeLabelNone(AxisLabelModel label, RadRect rect) { }
protected override void ArrangeLabelMultiline(AxisLabelModel label, RadRect rect) { throw new NotImplementedException(); }
protected override void ArrangeLabelMultiline(AxisLabelModel label, RadRect rect) { // TODO: }
internal virtual IEnumerable <AxisLabelModel> GenerateLabels() { AxisPlotMode plotMode = this.ActualPlotMode; int labelIndex = 0; int startIndex = this.LabelOffset; int labelStep = this.LabelInterval; int skipLabelCount = 1; IContentFormatter labelFormatter = this.ContentFormatter; object owner = this.Presenter; string format = this.GetLabelFormat(); // generate label for each major tick foreach (AxisTickModel tick in this.ticks) { if (labelIndex < startIndex) { labelIndex++; continue; } // skip minor ticks if (tick.Type == TickType.Minor) { continue; } if (skipLabelCount > 1) { skipLabelCount--; continue; } // no need to process last tick if we are plotting between ticks if (plotMode == AxisPlotMode.BetweenTicks && RadMath.IsOne(this.IsInverse ? 1 - tick.normalizedValue : tick.normalizedValue)) { break; } AxisLabelModel label = new AxisLabelModel(); object content = this.GetLabelContent(tick); if (labelFormatter != null) { content = labelFormatter.Format(owner, content); } else if (!string.IsNullOrEmpty(format)) { content = string.Format(CultureInfo.CurrentUICulture, format, content); } label.Content = content; tick.associatedLabel = label; if (plotMode == AxisPlotMode.BetweenTicks) { decimal length = tick.NormalizedForwardLength; if (length == 0) { length = tick.NormalizedBackwardLength; } tick.associatedLabel.normalizedPosition = tick.normalizedValue + (length / 2); } else { tick.associatedLabel.normalizedPosition = tick.normalizedValue; } yield return(label); skipLabelCount = labelStep; } }
protected abstract void ArrangeLabelNone(AxisLabelModel label, RadRect rect);