Profile Picture

How to attach ticks with axis in SurfaceChart with DateTimeScale???

Posted By Niranjan Singh 12 Years Ago

How to attach ticks with axis in SurfaceChart with DateTimeScale???

Author
Message
Niranjan Singh
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
I am having problem with axis tick lines these are not attached with the axis line. there may be some setting issue and i am not aware of that..

Setting that i have made for chart and scale as below:

Chart Settings:

private void ConfigureChartForSurfaceSeries()
{
chart.Enable3D = true;
chart.BoundsMode = BoundsMode.Stretch;
(chart as NCartesianChart).Fit3DAxisContent = true;
chart.Projection.SetPredefinedProjection(PredefinedProjection.OrthogonalTop);
chart.LightModel.EnableLighting = false;
chart.Wall(ChartWallType.Back).Visible = false;
chart.Wall(ChartWallType.Left).Visible = false;
chart.Wall(ChartWallType.Floor).Visible = false;

// setup Y axis
chart.Axis(StandardAxis.PrimaryY).Visible = true;
chartPrimaryYAxis.Anchor = new NDockAxisAnchor(AxisDockZone.TopRight, true);
chartPrimaryYAxis.ScaleConfigurator.InnerMajorTickStyle.Visible = false;
chartPrimaryYAxis.ScaleConfigurator.OuterMajorTickStyle.Visible = false;
(chartPrimaryYAxis.ScaleConfigurator as NLinearScaleConfigurator).LabelStyle.TextStyle.FillStyle.SetTransparencyPercent(100);
(chartPrimaryYAxis.ScaleConfigurator as NLinearScaleConfigurator).OuterMinorTickStyle.Visible = false;
(chartPrimaryYAxis.ScaleConfigurator as NLinearScaleConfigurator).InnerMinorTickStyle.Visible = false;
// setup Z axis
NAxis axisZ = chart.Axis(StandardAxis.Depth);
axisZ.Anchor = new NDockAxisAnchor(AxisDockZone.TopLeft);
NLinearScaleConfigurator scaleZ = new NLinearScaleConfigurator();
scaleZ.InnerMajorTickStyle.Visible = false;
scaleZ.MajorGridStyle.ShowAtWalls = new ChartWallType[0];
scaleZ.RoundToTickMin = false;
scaleZ.RoundToTickMax = false;
scaleZ.Title.Text = "Hours of Day";
scaleZ.Title.TextStyle = new NTextStyle(new Font("Arial", 10, FontStyle.Bold));
axisZ.ScaleConfigurator = scaleZ;
axisZ.Visible = true;
}


X Axis Settings:

chartPrimaryXAxis = chart.Axis(StandardAxis.PrimaryX);
// X Axis Configuration
dateTimeScale = new NDateTimeScaleConfigurator();
dateTimeScale.Title.Text = string.Empty;
dateTimeScale.LabelStyle.Angle = new NScaleLabelAngle(ScaleLabelAngleMode.Scale, 90);
dateTimeScale.LabelStyle.ContentAlignment = ContentAlignment.MiddleCenter;
dateTimeScale.LabelStyle.TextStyle.FontStyle = new NFontStyle("Times New Roman", 6);
dateTimeScale.LabelFitModes = new LabelFitMode[] { LabelFitMode.AutoScale };
chartPrimaryXAxis.ScaleConfigurator = dateTimeScale;
chartPrimaryXAxis.ScrollBar.ResetButton.Visible = true;
chartPrimaryXAxis.ScrollBar.ShowSliders = true;

dateTimeScale.EnableUnitSensitiveFormatting = true;
dateTimeScale.RoundToTickMax = false;
dateTimeScale.RoundToTickMin = false;
//dateTimeScale.MinTickDistance = new NLength(6, NRelativeUnit.ParentPercentage);
NDateTimeAxisPagingView dateTimePagingView = new NDateTimeAxisPagingView();
chartPrimaryXAxis.PagingView = dateTimePagingView;
chartPrimaryXAxis.ScrollBar.Visible = true;
dateTimePagingView.ResetMode = PagingViewResetMode.LastZoom;
In Demo of Surface Chart, there are LinearScale and Ordinal Scale is used and showing ticks within the Axis Line even it is showing correct with Y Axis and Z Axis the chart but it is little wired with X Axis that using DateTimeScale.

Please check the attached image and suggest me the solution without change the datetime scale.

Thanks in advance


Attachments
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Niranjan,

Try to set the depth of all chart walls to zero.



Best Regards,
Nevron Support Team



Niranjan Singh
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
Hi Expert,

Can you provide some example code snippet to do so. I have not gotten any property name depth in the walls of the chart. There i have width property that i have set to 0 but still the same issue. When i use Trackball tool then the Angle of view somewhat cause this problem.


I need little help regarding forum also, if you can tell me. As a suggestion, having sample project with the problem can improve the forum thread much help full to others. If it is possible then please let me know.

How can i format code in messages and attach sample code in zip files as you can do?


Thank you in advance for the answer.



Similar Topics


Reading This Topic