User (Legacy) Posted November 17, 2004 Report Share Posted November 17, 2004 is it possible to force the x axi labels to be, say, quarterly? It's implied that it is in the docs, but no specific info is given cheers Rob Link to comment Share on other sites More sharing options...
Software FX Posted November 17, 2004 Report Share Posted November 17, 2004 Yes. chart.AxisX.Step = 90; The following are "special" values for Step in a Date/Time Axis. 15 ----> Bi-weekly 30 ----> 1 Month 60 ----> 2 Months 90 ----> 1 Quarter 365 ---> 1 Year -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 17, 2004 Author Report Share Posted November 17, 2004 thanks! might I suggest a nice enumerated type with these values? Rob "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:Dlq0ZKLzEHA.1116@webserver3.softwarefx.com... > Yes. > > chart.AxisX.Step = 90; > > The following are "special" values for Step in a Date/Time Axis. > > 15 ----> Bi-weekly > 30 ----> 1 Month > 60 ----> 2 Months > 90 ----> 1 Quarter > 365 ---> 1 Year > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted November 17, 2004 Report Share Posted November 17, 2004 The property is of type double so that it can allow for other values not listed here. If we define the enumeration a casting will be needed as you can not assign an enumerated type to a double property. I've mentioned, in several occasions to the MS guys that assigning an enumerated type to an integer or double should NOT require a casting as an enumerated type appears as deriving from int, apparently the implementation is not quite like that so you end up having to do the casting, honestly I never got a good answer as of why that is. Another thing is that even if we define the enumeration, since the property is of type double, the intellisense will not be helpful to discover it. As you can see we have thought about this quite a bit but we have never been able to come up with an elegant solution. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 17, 2004 Author Report Share Posted November 17, 2004 Found another thing - if the Step is set to one of these special values (or zero), the LabelFormat.CustomFormat property is ignored. Is it possible to use a custom label format with these special values? "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:GqlOieOzEHA.1120@webserver3.softwarefx.com... > The property is of type double so that it can allow for other values not > listed here. If we define the enumeration a casting will be needed as you > can not assign an enumerated type to a double property. > > I've mentioned, in several occasions to the MS guys that assigning an > enumerated type to an integer or double should NOT require a casting as an > enumerated type appears as deriving from int, apparently the implementation > is not quite like that so you end up having to do the casting, honestly I > never got a good answer as of why that is. > > Another thing is that even if we define the enumeration, since the property > is of type double, the intellisense will not be helpful to discover it. > > As you can see we have thought about this quite a bit but we have never been > able to come up with an elegant solution. > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted November 19, 2004 Report Share Posted November 19, 2004 Yes. The thing is that when using "special" or "automatic" values the formatting is not just one but it is dependant of the step. Here is how the CustomFormat works when using"smart" steps: When using dates the custom format is a composite string containing different formats to use depending on the interval: <day format>;<month format>;<abbreviated year format>;<quarter format>;<year format> Where: <day format> = Regular date format (Default = Default Date Format) <month format> = How the labels are display if the interval is month (default = "MMM") <abbreviated year format>: When interval is Month or Quarter, the year is displayed when it changes (Default = 'YY) <quarter format> = When the interval is Quarter. Use {q} as the placeholder for the Quarter number (Default = Q{q}) <year format> = Used when the interval is a year or more. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted November 26, 2004 Author Report Share Posted November 26, 2004 cool, thanks. For monthly & quarterly labels, I'd like it to label the first day of the month or quarter. How can I do this? At the moment it's labelling dates in the middle of each period. cheers, Rob "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:p8q2wnozEHA.1116@webserver3.softwarefx.com... > Yes. The thing is that when using "special" or "automatic" values the > formatting is not just one but it is dependant of the step. > > Here is how the CustomFormat works when using"smart" steps: > > When using dates the custom format is a composite string containing > different formats to use depending on the interval: > > <day format>;<month format>;<abbreviated year format>;<quarter format>;<year > format> > > Where: > <day format> = Regular date format (Default = Default Date Format) > <month format> = How the labels are display if the interval is month > (default = "MMM") > <abbreviated year format>: When interval is Month or Quarter, the year is > displayed when it changes (Default = 'YY) > <quarter format> = When the interval is Quarter. Use {q} as the placeholder > for the Quarter number (Default = Q{q}) > <year format> = Used when the interval is a year or more. > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted November 29, 2004 Report Share Posted November 29, 2004 The format property won't help you there. The format property only controls how the labels are displayed, not WHICH labels are displayed. By default, when going by month or quarter, Chart FX will put a tickmark at the end of the period and center the label with the period name to the left of it. To have the First month instead of the last, you need to do this: chart1.AxisX.Style &= ~(AxisStyle.AutoFirstLabel | AxisStyle.AutoCenter); This will turn off the "end-of-the-period" behavior as well as the "centered labels" behavior. The you must set: chart1.AxisX.FirstLabel = <number of days from your first data point to the 1st day of the next month>; -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.