Profile Picture

Heat Map with added NAxisConstLines - How to bring ConstLines to top

Posted By joern kunze 5 Years Ago

Heat Map with added NAxisConstLines - How to bring ConstLines to top

Author
Message
joern kunze
Problem Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 86, Visits: 221
Hi Experts,
I have a NHeatMapSeries plot which looks like:
https://www.nevron.com/forum/uploads/images/40623aed-a9b4-49fe-a819-5b90.jpg

I have added NAxisConstLines for the X-Axis in the following way:
   //--- Grid: Add constlines between single fields of HeatMap
    if (true) {
      for (int iX = (centerX * -1); iX < centerX; iX++) {
       NAxisConstLine oBoarderLine = chart.Axis(StandardAxis.PrimaryX).ConstLines.Add();
       oBoarderLine.StrokeStyle.Color = Color.SteelBlue;
       oBoarderLine.StrokeStyle.Width = new NLength(2.0f);
       oBoarderLine.FillStyle = new NColorFillStyle(new NArgbColor(255, Color.SteelBlue));
       oBoarderLine.Value = iX;
      }
    }

How can I bring these Lines to a topmost plot level so that they appear visible over the heatmap ?

Thanks for your help,
best regards,
joern




Nevron Support
Posted 5 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,000
Hi Joern,

You can tell the axes to display on the front chart wall - the following code shows how to achieve this with a simple bar chart:
NChart chart = nChartControl1.Charts[0];

NBarSeries bar = new NBarSeries();

bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(30);
chart.Series.Add(bar);

// transparent visible front wall
chart.Wall(ChartWallType.Front).Visible = true;
chart.Wall(ChartWallType.Front).FillStyle = new NColorFillStyle(Color.Transparent);
chart.Wall(ChartWallType.Front).BorderStyle.Width = new NLength(0);

// axis constline shows on the front wall only
NAxisConstLine constline = new NAxisConstLine();
constline.Value = 10;
constline.SetShowAtWall(ChartWallType.Back, false);
constline.SetShowAtWall(ChartWallType.Front, true);
chart.Axis(StandardAxis.PrimaryY).ConstLines.Add(constline);

Hope this helps - let us know if you have any questions or meet any problems.

Best Regards,
Nevron Support Team



joern kunze
Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 86, Visits: 221
thanks a lot - making the front wall visible does the trick !

Best regards,
Joern



Similar Topics


Reading This Topic