skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ChartRenderer

Provides the base implementation for chart rendering functionality, handling drawing operations and text measurement for chart elements.

Inheritance
System.Object
ChartRenderer
CartesianRenderer
FunnelRenderer
PieRenderer
PolarRenderer
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.ChartView.dll

Syntax

public class ChartRenderer : IChartRenderer

Constructors

ChartRenderer(ChartArea)

Initializes a new instance of the ChartRenderer class with the specified chart area.

Declaration
public ChartRenderer(ChartArea area)
Parameters
ChartArea area

The chart area that this renderer will be associated with.

Properties

Graphics

Gets the System.Drawing.Graphics object from the current rendering surface.

Declaration
public Graphics Graphics { get; }
Property Value
System.Drawing.Graphics

Surface

Gets or sets the rendering surface used for drawing operations.

Declaration
public object Surface { get; }
Property Value
System.Object

Implements
IChartRenderer.Surface

Methods

Draw(Object)

Draws the chart using the specified rendering context.

Declaration
public virtual void Draw(object context)
Parameters
System.Object context

The graphics context used for rendering operations.

Implements
IChartRenderer.Draw(Object)

GetDistanceBetweenPoints(PointF, PointF)

Calculates the Euclidean distance between two points.

Declaration
public float GetDistanceBetweenPoints(PointF start, PointF end)
Parameters
System.Drawing.PointF start

The starting point.

System.Drawing.PointF end

The ending point.

Returns
System.Single

The distance between the two points as a float value.

HitTest(Int32, Int32)

Performs hit testing to find the data point at the specified coordinates.

Declaration
public virtual DataPoint HitTest(int x, int y)
Parameters
System.Int32 x

The x-coordinate for hit testing.

System.Int32 y

The y-coordinate for hit testing.

Returns
DataPoint

The DataPoint at the specified coordinates, or null if no data point is found.

Implements
IChartRenderer.HitTest(Int32, Int32)

Initialize()

Initializes the renderer by setting up smart labels controller and calculating label positions if available.

Declaration
protected virtual void Initialize()

Invalidate(Object)

Invalidates the specified model to trigger a redraw operation.

Declaration
public virtual void Invalidate(object model)
Parameters
System.Object model

The model object to invalidate.

Implements
IChartRenderer.Invalidate(Object)

MeasureRotatedLabels(String, Object, Double)

Measures the size of rotated text labels considering the rotation angle.

Declaration
public virtual RadSize MeasureRotatedLabels(string text, object context, double rotationAngle)
Parameters
System.String text

The text to measure.

System.Object context

The font context used for measurement.

System.Double rotationAngle

The rotation angle in degrees.

Returns
RadSize

A RadSize representing the measured dimensions of the rotated text.

Implements
IChartRenderer.MeasureRotatedLabels(String, Object, Double)

MeasureText(String, Object)

Measures the size of the specified text using the provided font context.

Declaration
public virtual RadSize MeasureText(string text, object context)
Parameters
System.String text

The text to measure.

System.Object context

The font context used for measurement.

Returns
RadSize

A RadSize representing the measured dimensions of the text.

Implements
IChartRenderer.MeasureText(String, Object)

ToPoint(RadPoint)

Converts a RadPoint to a System.Drawing.Point with rounded coordinates.

Declaration
public static Point ToPoint(RadPoint point)
Parameters
RadPoint point

The RadPoint to convert.

Returns
System.Drawing.Point

A System.Drawing.Point with rounded integer coordinates.

ToPointF(RadPoint)

Converts a RadPoint to a System.Drawing.PointF.

Declaration
public static PointF ToPointF(RadPoint point)
Parameters
RadPoint point

The RadPoint to convert.

Returns
System.Drawing.PointF

A System.Drawing.PointF with equivalent coordinates.

ToRectangle(RadRect)

Converts a RadRect to a System.Drawing.Rectangle with rounded coordinates.

Declaration
public static Rectangle ToRectangle(RadRect rect)
Parameters
RadRect rect

The RadRect to convert.

Returns
System.Drawing.Rectangle

A System.Drawing.Rectangle with rounded integer coordinates.

ToRectangleF(RadRect)

Converts a RadRect to a System.Drawing.RectangleF.

Declaration
public static RectangleF ToRectangleF(RadRect rect)
Parameters
RadRect rect

The RadRect to convert.

Returns
System.Drawing.RectangleF

A System.Drawing.RectangleF with equivalent dimensions.

ToSize(RadSize)

Converts a RadSize to a System.Drawing.Size with rounded coordinates.

Declaration
public static Size ToSize(RadSize size)
Parameters
RadSize size

The RadSize to convert.

Returns
System.Drawing.Size

A System.Drawing.Size with rounded integer dimensions.

ToSizeF(RadSize)

Converts a RadSize to a System.Drawing.SizeF.

Declaration
public static SizeF ToSizeF(RadSize size)
Parameters
RadSize size

The RadSize to convert.

Returns
System.Drawing.SizeF

A System.Drawing.SizeF with equivalent dimensions.

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.