Decluttering Surface Labels


Author
Message
Ioannis Psomadakis
Ioannis Psomadakis
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
Posts: 1, Visits: 1

Hello,  I need to display the data using the Surface control.  My 3D data is (Numeric, Numeric, Date).  I used the Grid Sub Type.  On the Data settings, the Labels for the Category and Series are set to be strings. So the Chart plots a (Numeric, String, String) surface.

As you can see from the attachment, the Labels are cluttered and one overwrites the other with very small fonts.  Is there way to tell the Chart to display one every say 10 values?  Any recommendation on decluttering and improving the label visibility?

Thanks


Attachments
NevronSample.JPG (209 views, 43.00 KB)
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 Ioannis,

Yes you can modify the number of labels per a group of ticks using custom code (this feature will be exposed in the next edition of the control trough the designer as well):

using System;
using System.Drawing;
using Nevron.GraphicsCore;
using Nevron.Chart;
using Nevron.ReportingServices;

namespace MyNamespace
{
 public class MyClass
 {
  /// <summary>
  /// Main entry point
  /// </summary>
  /// <param name="context"></param>
  public static void RSMain(NRSChartCodeContext context)
  {
   if (context.Document.Charts.Count == 0)
    return;

   NCartesianChart chart = context.Document.Charts[0] as NCartesianChart;
   if (chart == null)
    return;

   NOrdinalScaleConfigurator ordinalScale = chart.Axis(StandardAxis.PrimaryX).ScaleConfigurator as NOrdinalScaleConfigurator;
   if (ordinalScale != null)
   {
    // set number of ticks per label.
    ordinalScale.NumberOfTicksPerLabel = 10;
   }

   ordinalScale = chart.Axis(StandardAxis.Depth).ScaleConfigurator as NOrdinalScaleConfigurator;
   if (ordinalScale != null)
   {
    // set number of ticks per label.
    ordinalScale.NumberOfTicksPerLabel = 10;
   }
  }
 }
}


Alternatively you can use:

ordinalScale.MajorTickMode = MajorTickMode.AutoMaxCount;
ordinalScale.MinTickDistance = new NLength(20);

instead of:

ordinalScale.NumberOfTicksPerLabel = 10;

for the X/Depth axes - in this case the control will place labels spaced between 20 points on the axis.

Let us know if you meet any problems...



Best Regards,
Nevron Support Team


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