Profile Picture

How do I move the Position of Custom Value Field Using C#

Posted By Andrew Soper 9 Years Ago

How do I move the Position of Custom Value Field Using C#

Author
Message
Andrew Soper
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 4, Visits: 8
Hello,

I am new to C# and was wondering how I can move the x and y position of the Value Field so it is easier to read.  I appreciate any help.  Below is my code:

using System;

using System.Drawing;

using Nevron.GraphicsCore;

using Nevron.Chart;

using Nevron.ReportingServices;

namespace MyNamespace

{

    /// <summary>

    /// Sample class

    /// </summary>

    public class MyClass

    {

        /// <summary>

        /// Main entry point

        /// </summary>

        /// <param name="context"></param>

        public static void RSMain(NRSGaugeCodeContext context)

        {

            // check if gauge document contains gauges

            if (context.document.Gauges.Count == 0)

                return;

             double target = context.GetDoubleParameter("Target");

            // get the first gauge

            NGaugePanel gauge = context.document.Gauges[0] as NGaugePanel;

            if (gauge.Indicators.Count == 0)

                return;

            // adding custom range labels

            NLinearScaleConfigurator scale = ((NGaugeAxis)gauge.Axes[0]).ScaleConfigurator as NLinearScaleConfigurator;

            NCustomValueLabel customValueLabel = new NCustomValueLabel(target, "Target - "+ target);

            customValueLabel.Style.KeepInsideRuler = false;

            customValueLabel.Style.TextStyle.FillStyle = new NColorFillStyle(Color.Black);

            customValueLabel.Style.Angle = new NScaleLabelAngle(ScaleLabelAngleMode.Scale, 0);

            scale.CustomLabels.Add(customValueLabel);

        }

    }

}

Thanks!





Similar Topics


Reading This Topic