
Replacing numeric labels with text on linear axis
This discussion was imported from CodePlex
robjmberry wrote at 2014-02-05 13:16:
Hi,
I would like to create a Bar chart that shows the progress of items through an established workflow.
For example: A made up order system has the following stages:
1) Credit check
2) Credit approved
3) Order dispatched
4) Order received
5) Order closed
What I’d like to do is have open orders listed vertically on a category axis and then bar the will show how far through the life-cycle the order is. Using a linear axis and the numerical value of the status this can be done easily. What I’d like is to replace the number on the axis with the stage, eg: 2 would be shown as Credit Approved
Is this possible ?
thanks,
rob
I would like to create a Bar chart that shows the progress of items through an established workflow.
For example: A made up order system has the following stages:
1) Credit check
2) Credit approved
3) Order dispatched
4) Order received
5) Order closed
What I’d like to do is have open orders listed vertically on a category axis and then bar the will show how far through the life-cycle the order is. Using a linear axis and the numerical value of the status this can be done easily. What I’d like is to replace the number on the axis with the stage, eg: 2 would be shown as Credit Approved
Is this possible ?
thanks,
rob
objo wrote at 2014-02-14 16:07:
try to create a custom
We could add a
If you want this included in the library:
Axis
class and override the Axis.FormatValue
method.public class MyLinearAxis : LinearAxis { public override string FormatValue(double x) { switch ((int)x) { case 1: return "Credit check"; // etc. default: return string.Empty; } } }
Func<double,string>
property to the Axis class if this is a frequently needed feature. Something like this:public Func<double, string> LabelFormatter { get; set; } public virtual string FormatValue(double x) { if (this.LabelFormatter != null) { return this.LabelFormatter(x); }
- create an issue
- create a fork
- add some unit tests
- implement
- submit including issue #
- make a pull request.
Service d'assistance aux clients par UserEcho