Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
865
Gantt Chart - Task not aligned to Gridline - Day\Week\Month wise - v6.3
posted

Hi,

We are using Infra version 6.3.
We use GanttChart to display Day\Week\Month wise tasks with in a ASP.Net page.

Problem: 
Tasks within the chart is not exactly aligned to the corresponding Start and End days (in X2 axis). 
Tasks are overlapping the Days grid lines and sometimes tasks stop before reaching the End date Grid line.
Also last grid line is not drawn.

Steps to reproduce the issue:
1.  Create a DB table as required for Gantt Chart
2.  Drag a Ultra chart to the design and paste the below source in Code behind page to set the properties of the Chart Control.

Please look into the below Source and help me out of this issue.

Thanks,
Anandhev

-------------------------------------------------------------------------------------- ----------

 
private void SetProperties()

{

UltraChart1.ChartType = ChartType.GanttChart;

//-- Show X2 axis and hide X axis
UltraChart1.Axis.X.Visible = false;
UltraChart1.Axis.X2.Visible = true;

//-- Show the Percentage of completion in Chart
UltraChart1.GanttChart.ShowCompletePercentages = true;
UltraChart1.Axis.Y.Extent = 130;
UltraChart1.Axis.X.Extent = 110;

//-- Hide the Series label in Y axis
UltraChart1.Axis.Y.Labels.SeriesLabels.Visible = false;

//-- Percentage of Completion Color
UltraChart1.GanttChart.CompletePercentagesPE.Fill = Color.Green;
UltraChart1.GanttChart.CompletePercentagesPE.StrokeOpacity = 0;

UltraChart1.GanttChart.EmptyPercentagesPE.Fill = Color.Transparent;
UltraChart1.GanttChart.EmptyPercentagesPE.StrokeOpacity = 0;

//-- Task Color
UltraChart1.Effects.Enabled = false;

//-- No Gradient or any effects
UltraChart1.ColorModel.AlphaLevel = 0;

//-- No ColorModel's Style effect
UltraChart1.ColorModel.ModelStyle = ColorModels.CustomSkin;
PaintElement pe = new PaintElement();
pe.ElementType = PaintElementType.SolidFill;
pe.Fill = Color.CornflowerBlue;
pe.StrokeOpacity = 255;
pe.StrokeWidth = 1;
UltraChart1.ColorModel.Skin.PEs.Add(pe);

//-- Remove Grid lines of X2 and Y axis
UltraChart1.Axis.X2.MajorGridLines.Visible = false;
UltraChart1.Axis.X2.MinorGridLines.Visible = false;
UltraChart1.Axis.Y.MajorGridLines.Visible = false;
UltraChart1.Axis.Y.MinorGridLines.Visible = false;

//-- X2 axis label format
UltraChart1.Axis.X2.Labels.ItemFormat = AxisItemLabelFormat.Custom;
UltraChart1.Axis.X2.Labels.ItemFormatString = "<ITEM_LABEL:ddd, dd-MMM-yy>";

//-- Tooltip format
UltraChart1.Tooltips.Font.Name = "Verdana";
UltraChart1.Tooltips.Font.Size = FontUnit.Small;
UltraChart1.Tooltips.Format = TooltipStyle.Custom;
UltraChart1.Tooltips.FormatString = "<START_TIME:dd-MMM-yy>....<END_TIME:dd-MMM-yy>";

//-- Data Interval Type ==> Days/Weeks/Months
UltraChart1.Axis.X2.TickmarkStyle = AxisTickStyle.DataInterval;
UltraChart1.Axis.X2.TickmarkIntervalType = AxisIntervalType.Days;
UltraChart1.Axis.X2.TickmarkInterval = 1;

UltraChart1.Axis.X2.Labels.HorizontalAlign = StringAlignment.Near;
UltraChart1.Axis.X2.Labels.VerticalAlign = StringAlignment.Near;
UltraChart1.Axis.X2.MajorGridLines.Visible = true;
UltraChart1.Axis.X2.MinorGridLines.Visible = true;

UltraChart1.Width = 1500;

}

 

 

 

 

Parents Reply Children
No Data