Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Standard.v4.4 Assembly / Xceed.Chart.Standard Namespace / View Class / Projection Property
Example


In This Topic
    Projection Property
    In This Topic
    Controls the projection type of the camera. Can be ProjectionType.Orthogonal or ProjectionType.Perspective.
    Syntax
    'Declaration
     
    <CategoryAttribute("General")>
    <DescriptionAttribute("Controls the projection type of the camera. Can be ProjectionType.Orthogonal or ProjectionType.Perspective.")>
    <DefaultValueAttribute(Mono.Cecil.CustomAttributeArgument)>
    Public Property Projection As ProjectionType
    'Usage
     
    Dim instance As View
    Dim value As ProjectionType
     
    instance.Projection = value
     
    value = instance.Projection
    [Category("General")]
    [Description("Controls the projection type of the camera. Can be ProjectionType.Orthogonal or ProjectionType.Perspective.")]
    [DefaultValue(Mono.Cecil.CustomAttributeArgument)]
    public ProjectionType Projection {get; set;}
    Remarks
    Perspective projection is more suitable for 3D charts, because it gives you a perception of depth. In this mode you can also control the PerspectiveAngle parameter. If you want to display 2D charts you must switch to orthogonal projection which is better for analytical charts like stock for example. In Orthogonal projection you can modify the XDepth and YDepth parameters that allow you to achieve two and a half projection, which is also widely used.
    Example
    The following example modifies the projection applied on the chart camera:
    Dim chartView As View = (CType(ChartControl.Charts(0), Chart)).View 
    chartView.Projection = ProjectionType.Orthogonal
    chartView.XDepth = 0.4f
    chartView.YDepth = 0.4f
    View chartView = ((NChart)NChartControl.Charts[0]).View;
    chartView.Projection = ProjectionType.Orthogonal;
    chartView.XDepth = 0.4f;
    chartView.YDepth = 0.4f;
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also