imran_javed@hotmail.com Posted September 2, 2010 Report Share Posted September 2, 2010 Hi, We have a line chart with as much as 1000+ or more date values in x-axis and numeric values on y-axis. We can have more then one series in the chart. We are using arraylist of dates to pouplate x-axis. this data does not contain weekends. Therefor it has only data for Monday to Friday and Satureday, Sunday Dates are skiped from the series. But Chart shows dates lines/space for Satureday and Sundays. Can you help me to skip the weekends from the chart showing data for years, 1 to 5 years on daily basis? I tried AutoScall property but it make chart crash and not displayed. Thanks Quote Link to comment Share on other sites More sharing options...
Frank Posted September 21, 2010 Report Share Posted September 21, 2010 The X-Axis can be one of the following 2: - Continuous: In this mode the scale will be continuous and not dictated by the data points but by a range and a step. - Discrete/Categorical: The X-Axis is simply a collection of points. There is no fixed relationship between the labels, they are simply strings. Some chart type: Bars,Hi-Low-Close,Candlestick and Cubes only support discrete/categorical X-Axis, therefore, if like in your case, the date skips some values, they will be reflected in the X-Axis. When your chart contains X-Values and the X-Axis it is categorical, we do what we call "Data Driven Labeling" in which we let the data control the labels on the X-Axis, not the range, but the actual points. In a continuous X-Axis, the data is irrelevant. Only the range has an effect on the X-Axis labeling. Looks to me that you want to have Data Driven labels, but by default, if your chart is not one of the galleries mentioned above, your X-Axis will be continuous. You can change this by setting: chart.ExtraStyle |= ChartStyles.ForceDataDriven; Quote Link to comment Share on other sites More sharing options...
imran_javed@hotmail.com Posted September 22, 2010 Author Report Share Posted September 22, 2010 Hi Frank, We are using Line Chart and I am afraid this is not working for us. we were using following chart.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("Field1", ChartFX.WebForms.FieldUsage.XValue)); now we are used following chart.DataSourceSettings.Fields.Add(new ChartFX.WebForms.FieldMap("Field1", ChartFX.WebForms.FieldUsage.Label)); and it works fine and weekends are skipped but it is disabling Sections added on that axis can you assist further in this context Thanks 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.