Profile Picture

Well Logging Chart

Posted By Kianoosh Ahmadi Last Year
Author
Message
Kianoosh Ahmadi
Posted Last Year
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 7 Months Ago
Posts: 4, Visits: 88
I'm trying to create oil well related software for the company I work for, and the most important part of the software is well logging (below picture, it's from similar software) chart.
I don't know where to start, if somebody could give me some hints, even on identifying parts counterparts on Nevon Chart, I would be appreciated.
I'm using WPF version of nevron chart.

https://www.nevron.com/forum/uploads/images/53cf163d-6587-459a-81ae-3471.jpg


Nevron Support Team
This post has been flagged as an answer
Posted Last Year
View Quick Profile
Supreme Being

Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)Supreme Being (3,273 reputation)

Group: Moderators
Last Active: 1 days ago @ 8:33 AM
Posts: 2,593, Visits: 2,279

Hi Kianoosh,

It is very easy to create this type of chart with nevron - all you need to do is to create several custom axes which are docked on the front left and turn the chart orientation (so that the x axis appears on the left). The following code shows how to achieve that:

  private void Form1_Load(object sender, EventArgs e)
  {
   NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];

   chart.SetPredefinedChartStyle(PredefinedChartStyle.HorizontalLeft);
   chart.Axis(StandardAxis.PrimaryY).Visible = false;
   chart.Axis(StandardAxis.SecondaryY).Visible = true;
   chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator = new NLinearScaleConfigurator();


   {
    NAxis axis = CreateAxis(chart, true, 0, 48, 0, 100, "Axis 1", Color.Red);
    NLineSeries line = CreateLineSeries(100, Color.Red);
    chart.Series.Add(line);

    line.DisplayOnAxis(StandardAxis.PrimaryY, false);
    line.DisplayOnAxis(axis.AxisId, true);
   }

   {
    NAxis axis = CreateAxis(chart, false, 52, 100, 0, 100, "Axis 2", Color.Green);
    NLineSeries line = CreateLineSeries(100, Color.Green);
    chart.Series.Add(line);

    line.DisplayOnAxis(StandardAxis.PrimaryY, false);
    line.DisplayOnAxis(axis.AxisId, true);
   }

   {
    NAxis axis = CreateAxis(chart, true, 0, 48, 0, 40, "Axis 3", Color.Blue);
    NLineSeries line = CreateLineSeries(40, Color.Blue);
    chart.Series.Add(line);

    line.DisplayOnAxis(StandardAxis.PrimaryY, false);
    line.DisplayOnAxis(axis.AxisId, true);
   }

   {
    NAxis axis = CreateAxis(chart, false, 52, 100, 0, 40, "Axis 4", Color.Cyan);
    NLineSeries line = CreateLineSeries(40, Color.Cyan);
    chart.Series.Add(line);

    line.DisplayOnAxis(StandardAxis.PrimaryY, false);
    line.DisplayOnAxis(axis.AxisId, true);
   }
  }

  private static NLineSeries CreateLineSeries(double maxValue, Color color)
  {
   NLineSeries line = new NLineSeries();
   line.UseXValues = true;
   line.DataLabelStyle.Visible = false;
   line.BorderStyle.Color = color;

   Random random = new Random();

   for (int i = 0; i < 20; i++)
   {
    line.XValues.Add(i);
    line.Values.Add(random.Next((int)maxValue));
   }

   return line;
  }

  private static NAxis CreateAxis(NCartesianChart chart, bool createLevel, float beginPercent, float endPercent, double min, double max, string title, Color color)
  {
   NAxis axis = ((NCartesianAxisCollection)chart.Axes).AddCustomAxis(AxisOrientation.Vertical, AxisDockZone.FrontLeft);

   axis.Visible = true;
   axis.Anchor.BeginPercent = beginPercent;
   axis.Anchor.EndPercent = endPercent;
   ((NDockAxisAnchor)axis.Anchor).CreateNewZoneLevel = createLevel;

   axis.View = new NRangeAxisView(new NRange1DD(min, max), true, true);

   NLinearScaleConfigurator linearScale = new NLinearScaleConfigurator();
   linearScale.MajorTickMode = MajorTickMode.CustomTicks;
   linearScale.CustomMajorTicks.Add(min);
   linearScale.CustomMajorTicks.Add(max);
   linearScale.Title.Text = title;
   linearScale.Title.TextStyle.FillStyle = new NColorFillStyle(color);
   linearScale.RulerStyle.BorderStyle.Color = color;
   linearScale.InnerMajorTickStyle.LineStyle.Color = color;
   linearScale.OuterMajorTickStyle.LineStyle.Color = color;
   linearScale.LabelStyle.TextStyle.FillStyle = new NColorFillStyle(color);
   axis.ScaleConfigurator = linearScale;

   return axis;
  }

Let us know if you meet any problems.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic