richard Posted September 18, 2007 Report Share Posted September 18, 2007 I'm using SQL to drive a chart with a date for the x axis using intelligent labelling but I need to have some control over the format using CustomFormat. If I set this eg to dd-MMM;MMM and produce rows with dates of 1st of each month the labels are incorrect when the chart is resized. At small widths the labels are correct but at larger widths the first label is duplicated and the last is missing. This can be improved by passing dates of eg 15th of each month but the labels are often incorrect. How can this be solved? Quote Link to comment Share on other sites More sharing options...
Frank Posted September 18, 2007 Report Share Posted September 18, 2007 At larger sizes is the step over one month? If so, you need to provide a format for that, your CustomFormat only gives a guidance for days and months. You need to complete it with the quarter and year. For example: chart.AxisX.LabelsFormat.CustomFormat = "MM/dd/yyy;MMM;`yy;Q{q};yyyy" Check the following KB article for more details: Q7001073. Setting custom formats for Date axes URL: http://support.softwarefx.com/ShowArticleSep.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/700/1/073.htm?_r=1 Quote Link to comment Share on other sites More sharing options...
richard Posted September 20, 2007 Author Report Share Posted September 20, 2007 It depends what you mean by step size. Each point is marked as eg the first day on consecutive months. For example 1 Jul 2006, 1 Aug 2006 etc. The problem occurs even with 3 consecutive months. I added the other formats as suggested but it made no difference. I thought the custom format had defaults - in any case it surely shouldn't duplicate or skip labels. Perhaps you are counting the days between points rather than the month from the calendar? Quote Link to comment Share on other sites More sharing options...
Frank Posted September 20, 2007 Report Share Posted September 20, 2007 No that's not what we do. Please attach a binary file for this chart so that we can test it and determine what the problem is. A binary file of the chart can be obtained by calling the Export method. Alternatively you can attach a sample program that is self contained (no external data) and attach it to your post. Quote Link to comment Share on other sites More sharing options...
richard Posted September 21, 2007 Author Report Share Posted September 21, 2007 Enclosed is small file with 6 consecutive months and MMM custom format. It produces labels of Apr,Apr,May,Jun,Jul,Blank alough the data editor show correct labels Quote Link to comment Share on other sites More sharing options...
Frank Posted September 26, 2007 Report Share Posted September 26, 2007 Sorry but for some reason (probably our server's fault) I can't get the attachment. Please re-post. Quote Link to comment Share on other sites More sharing options...
richard Posted September 27, 2007 Author Report Share Posted September 27, 2007 Here you are Quote Link to comment Share on other sites More sharing options...
richard Posted October 2, 2007 Author Report Share Posted October 2, 2007 Have you received this file - any progress on the analysis? Quote Link to comment Share on other sites More sharing options...
Frank Posted October 2, 2007 Report Share Posted October 2, 2007 I still can not get the file? Can you? Try putting it in a ZIP file. Quote Link to comment Share on other sites More sharing options...
richard Posted October 4, 2007 Author Report Share Posted October 4, 2007 Try this Quote Link to comment Share on other sites More sharing options...
Frank Posted October 17, 2007 Report Share Posted October 17, 2007 I got it this time. The problem is the following: You are setting the custom format to: MMM;MMM;Q;yy That's telling Chart FX to use MMM (first part) as the "by-day" labeling format. When the space becomes big, Chart FX chooses a step lower than one month but because your labels are formatted like MMM then you get repetitions. If you want your X-Axis step to be fixed to one month, then set AxisX.Step = 30 this way Chart FX will not try to go any lower. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.