Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Visualization/LabelProvider/ContinuousLabelProvider.cs @ 1194

Last change on this file since 1194 was 1194, checked in by mstoeger, 16 years ago

Implemented a continuous-, discrete- and string- label provider for the X/Y axis labels. (#433)

File size: 442 bytes
Line 
1using System.Globalization;
2
3namespace HeuristicLab.Visualization.LabelProvider {
4  public class ContinuousLabelProvider : ILabelProvider {
5    private readonly string format;
6
7    public ContinuousLabelProvider() {}
8
9    public ContinuousLabelProvider(string format) {
10      this.format = format;
11    }
12
13    public string GetLabel(double value) {
14      return value.ToString(format, CultureInfo.InvariantCulture);
15    }
16  }
17}
Note: See TracBrowser for help on using the repository browser.