Adding more then 1 NHighLowSeries to a same axis of same chart


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Manal,
Yes that's right - the paint order is controlled from the position of the series in the chart collection. The first series appears on top of the other series and so on. In order to change the z order of the series you need to change its place in the series collection. We may consider adding a z order property for the series. Let us know if you meet any problems or have any questions.

Best Regards,
Nevron Support Team


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Manal,
Please elaborate on this question. The following code shows how to create a chart with two high low series:


   NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
   
   // set a chart title
   NLabel title = nChartControl1.Labels.AddHeader("2D High Low Chart");
   title.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic);
   title.TextStyle.FillStyle = new NColorFillStyle(Color.Gray);

   // add a High-Low series
   Random rand = new Random();
   
   NHighLowSeries highLow1 = (NHighLowSeries)chart.Series.Add(SeriesType.HighLow);
   highLow1.Name = "High-Low 1";
   highLow1.HighFillStyle = new NColorFillStyle(Color.Gray);
   highLow1.LowFillStyle = new NColorFillStyle(Color.DarkOrange);
   highLow1.DataLabelStyle.Visible = false;

   highLow1.ClearDataPoints();

    
   for (int i = 0; i < 20; i++)
   {
    double d1 = Math.Log(i + 1) + 0.1 * rand.NextDouble();
    double d2 = d1 + Math.Cos(0.33 * i) + 0.1 * rand.NextDouble();

    highLow1.HighValues.Add(d1);
    highLow1.LowValues.Add(d2);
   }

   // add a High-Low series
   NHighLowSeries highLow2 = (NHighLowSeries)chart.Series.Add(SeriesType.HighLow);
   highLow2.Name = "High-Low 2";
   highLow2.HighFillStyle = new NColorFillStyle(Color.Red);
   highLow2.LowFillStyle = new NColorFillStyle(Color.Green);
   highLow2.DataLabelStyle.Visible = false;

   highLow2.ClearDataPoints();

   for (int i = 0; i < 20; i++)
   {
    double d1 = Math.Log(i + 1) + 0.5 * rand.NextDouble();
    double d2 = d1 + Math.Cos(0.33 * i) + 0.5 * rand.NextDouble();

    highLow2.HighValues.Add(d1);
    highLow2.LowValues.Add(d2);
   }

Generally you can mix an unlimited number of series in a chart.



Best Regards,
Nevron Support Team


Manal Goyal
Manal Goyal
Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)Forum Member (44 reputation)
Group: Forum Members
Posts: 29, Visits: 405
Hi,

I need to add 2 High-Low series to the same chart, but I am only able to see one series in outer chart, is there any way I can add more then one NHighLowSeries to the same chart?

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search