Telerik Forums
UI for WinForms Forum
1 answer
14 views

Hi,

Is it possible to have multiple grids in your chart when working with multiple axes? I only get the grid for the last axis, which is the yellow one in the image below. I would like to have a grid for each axis.

Dinko | Tech Support Engineer
Telerik team
 answered on 30 Jan 2024
2 answers
21 views

Hello team,

As said in the title, I have a Chart with a cartesian grid visible and working fine. The problem is when I add a series programmatically and the series data is empty (see img.2): my chart displays the new axis as expected with no values since there is no data for the series, but the grid disappears.

Img.1 : Two series with data. The grid is visible fine.

Img.2: Two series with one empty. The grid disappears.

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Jan 2024
1 answer
15 views

Is there a way to add Tool Tip Text to the legend items that get generated?  I have Tool Tip Text on the Series object, but I would like it on the Legend Items as well. 

Also, one other question, is there a way to customize how the legend shows the value next to the key?  Right now, our legand keys are "ABC 123".  I would like to add a "-" between the KEY and the COUNT value. 

 

TIA

 

Nadya | Tech Support Engineer
Telerik team
 answered on 19 Jan 2024
2 answers
18 views

 

Hi team ,

I am using Telerik UI for winforms Chartview Drill down charts. I am using line series . I need to get the labels on top of every value( please refer attached screenshot of demo app) but getting object reference not set to an instance of an object .particularly in line  series.ShowLabels = true;  Can you please guide on this?

If I set

  series.DataSource = DrillDownViewModel.ParseDataByDay(year, month);
                    series.ShowLabels = true;
                    series.DrawLinesToLabels = true;
                    series.SyncLinesToLabelsColor = false;

 

Thanks

Anup

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Dec 2023
2 answers
20 views

Hi team,

 

I have a scenario where we need to add line series to the chart dynamically from code behind and I need to bind live data (i.e, data changes for every 2 seconds) . I am using Telerik UI for WinForms controls . 

One static line series work perfectly fine using the demo sample. The problem is adding 'n' number of line series and setting data every 2 seconds . In the sample , data is set using a global variable. but we need to achieve the same dynamically 

 

Can anyone guide on this

Anup
Top achievements
Rank 1
Iron
 answered on 13 Dec 2023
1 answer
21 views

Hi!

I have a chart with multiple Y axes, series, and an X axis as DateTimeContinuousAxis.

The thing is my chart is customizable and I should be able to change the series styling from line to column. When I change one of my series to a column, it is not centered with the rest of the series and according to the X-axis (see first img).

See the tooltips that the lines are at the same point (img2) but when I change to column, the column ends at that point, it is not centered.

Any suggestion?

Columns

Linear

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Dec 2023
1 answer
16 views

Hi

I am playing with the RadRangeSelector. I have associated it to an existing chart. The chart is dynamically filled using data from the database.

In the image here below, the top control is a RadRangeSelector, the bottom control is a RadChartView.

Notice that my bottom chart shows series as stacked. How can I get the RadRangeSelector also showing stacked series?

Also notice that the dates are not inlined between top and bottom. How can the RadRangeSelector be sorted by dates (as my chart is showing)?

 

Nadya | Tech Support Engineer
Telerik team
 answered on 15 Nov 2023
1 answer
16 views

Hi,

I'm using Telerik for Winforms 2023.3.1010 on .NET 7.

While trying to configure the position of my label position using PieTwoLabelColumnsStrategy, only the first label seems to be working with DistanceBetweenLabels property.

 

 PieTwoLabelColumnsStrategy strategy = new PieTwoLabelColumnsStrategy()
 {
     DistanceBetweenLabels = 50,
     DistanceToLabel = -100
 };

 SmartLabelsController smartLabelsController = new SmartLabelsController
 {
     Strategy = strategy
 };

 radChartView.Controllers.Add(smartLabelsController);
 radChartView.ShowSmartLabels = true;

Here is how I'm filling the chart:


   radChartView.AreaType = ChartAreaType.Pie;
   radChartView.Series.Clear();

   DonutSeries donut = new DonutSeries
   {
       ShowLabels = true,
       LabelMode = PieLabelModes.Horizontal,
       DrawLinesToLabels = true,
       SyncLinesToLabelsColor = true,
       NumberOfColors = categoryCount
   };

   foreach (var v in totals.OrderByDescending(s => s.Statut))
   {
       PieDataPoint point = new PieDataPoint(v.Nombre, v.Statut)
       {
           Label = $"{v.Percentage}% {v.Statut}"
       };

       donut.DataPoints.Add(point);
   }

   radChartView.Series.Add(donut);
   radChartView.Area.View.Palette = KnownPalette.Metro;
   radChartView.SelectionMode = ChartSelectionMode.SingleDataPoint;
   radChartView.BackColor = Color.WhiteSmoke;

With small percentages, it doesn't work (except of the right bottom label)

With higher percentages it seems to be working :

The behavior is quite inconsistent.

Thank you for your help.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Nov 2023
8 answers
30 views

Hello Telerik Team,

I want to implement some custom renderings or a overlay for a radChart. I added a screenshot of my application with some annotations. My goal is to remove the dummy resource from the scheduler. The cells of the dummy resource are only used to show workload-percentages. But before I can remove it, I need to display the workload in the ChartView, more precisely in the RangeSelector.

Screenshot

I already implemented a custom CartesianRenderer and custom BarSeriesDrawPart to control the color of the bars depending on the calculated workload. But now I want a Label with the workload percentage centered on each bar. But i don't know how to calculate the the rectange of the area from 0% to 100% to figure out the correct positioning.

My solution so far:


internal class CustomBarSeriesDrawPart : BarSeriesDrawPart
{
    public Font DefaultFont { get; private set; }


    public CustomBarSeriesDrawPart(BarSeries series, IChartRenderer renderer, Font defaultFont) : base(series, renderer)
    {
        DefaultFont = defaultFont;
    }

    public override void DrawSeriesParts()
    {
        //LogHelper.Info("CustomBarSeriesDrawPart.DrawSeriesParts() START");
        if (!(Renderer is CustomCartesianRenderer renderer))
            throw new ApplicationException($"Renderer ist nicht vom Typ \"{nameof(CustomCartesianRenderer)}\"");

        var graphics = ((ChartRenderer)Renderer).Graphics;
        var radGraphics = new RadGdiGraphics(graphics);

        for (int i = 0; i < Element.DataPoints.Count; i++)
        {
            RadRect slot = Element.DataPoints[i].LayoutSlot;

            //how to get the rectangle for the full slot (from 0% to 100% height)? 
            RectangleF barBounds = new RectangleF((float)(OffsetX + slot.X), (float)(OffsetY + slot.Y), (float)slot.Width, (float)slot.Height);

            DataPointElement childElement = (DataPointElement)Element.Children[i];

            float realWidth = barBounds.Width * childElement.HeightAspectRatio;
            barBounds.Width = realWidth;

            barBounds.Height = Math.Max(barBounds.Height, 1f);
            double percentage = 0;
            Color color;

            if (Element.DataPoints[i] is CategoricalDataPoint point)
            {
                percentage = point.Value ?? 0;

                //color = Owner.Auslastungsfarbe(percentage);
                color = renderer.Owner.Auslastungsfarbe(percentage);
            }
            else
                color = Color.LightGray;

            radGraphics.FillRectangle(barBounds, color);

            //radGraphics.DrawEllipse();

            var parameters = new TextParams()
            {
                text = $"{(int)percentage}%",
                alignment = ContentAlignment.MiddleCenter,
                foreColor = Color.Black,
                paintingRectangle = barBounds,
                font = DefaultFont,
            };
            radGraphics.DrawString(parameters, barBounds.Size);
        }
        //base.DrawSeriesParts();
    }
}

Hope you can help my with it.

Regards,

Stephan

Stephan
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 08 Nov 2023
1 answer
23 views

Hi,

 

I’m trying to draw CartesianGridLineAnnotation in front of each Y axis tick.

 

The Y axis number of ticks depends on the size of the RadChartView. The property DesiredTickCount is update into the SizeChanged event of the Chart. (Same issue with the resize event of the RadChartView).

 

It’s working fine when the form is resize with the mouse drag, but when I resize the form by double clicking the form (switch to full screen), it’s not working as expected.

 

ActualRange property seems not updated in the non working case, is there a way to avoid that ?

 

Thanks.

Nadya | Tech Support Engineer
Telerik team
 answered on 06 Nov 2023
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
Menu
RichTextEditor
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?