Profile Picture

NDateTimeScaleConfigurator in NMeshSurfaceSeries

Posted By Aurelien GIRARD 14 Years Ago
Author
Message
Nevron Support
Posted 14 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 Aurélien,

In order to use date time values for the x axis you must add valid date times to the x value in the mesh surface series. The following code snippet shows how to do that:

   NChart chart = nChartControl1.Charts[0];
   chart.Enable3D = true;
   chart.Width = 50;
   chart.Height = 50;
   chart.Depth = 50;

   chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = new NDateTimeScaleConfigurator();

   NMeshSurfaceSeries mesh = new NMeshSurfaceSeries();
   DateTime[] dates = new DateTime[4];
   DateTime now = DateTime.Now;

   dates[0] = now;
   dates[1] = now + new TimeSpan(10, 0, 0, 0);
   dates[2] = now + new TimeSpan(20, 0, 0, 0);
   dates[3] = now + new TimeSpan(30, 0, 0, 0);

   Random rand = new Random();
   mesh.Data.SetGridSize(4, 4);
   for (int x = 0; x < 4; x++)
   {
    for (int z = 0; z < 4; z++)
    {
     mesh.Data.SetValue(x, z, rand.Next(10), dates[x], z);
    }
   }

   chart.Series.Add(mesh);

   nChartControl1.Controller.Tools.Add(new NSelectorTool());
   nChartControl1.Controller.Tools.Add(new NTrackballTool());
   nChartControl1.Refresh();

Hope this helps - questions or comments - please feel free...



Best Regards,
Nevron Support Team



Aurelien GIRARD
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 1, Visits: 1

Hello,

I have problems to use NDateTimeScaleConfigurator in NMeshSurfaceSeries.

I just have to use a custom DateTime scale to my Surface, is anyone can do this and explain me how to do this please, since 2 weeks I try without success.

Thank you.

 

Aurélien. 





Similar Topics


Reading This Topic