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
|
Rev | Line | |
---|
[1182] | 1 | using System.Globalization;
|
---|
| 2 |
|
---|
[1194] | 3 | namespace HeuristicLab.Visualization.LabelProvider {
|
---|
| 4 | public class ContinuousLabelProvider : ILabelProvider {
|
---|
[1182] | 5 | private readonly string format;
|
---|
| 6 |
|
---|
[1194] | 7 | public ContinuousLabelProvider() {}
|
---|
[1182] | 8 |
|
---|
[1194] | 9 | public ContinuousLabelProvider(string format) {
|
---|
[1182] | 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.