Telerik Forums
UI for WinForms Forum
3 answers
13 views

Hi ,

I am having a range bar series. When hovered over a range data point i need to get the plot value and display as a tooltip of that hovered data point. Attached is the sample code , where i need to capture range data point.


        

private void radChartView1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e) { RadChartElement element = (RadChartElement)sender; //RangeDataPoint dataPoint = (RangeDataPoint)element.;//var item = sender as RadChartElement;//if (item != null)//{// var dataItem = item.DataPoint as RangeDataPoint;// e.ToolTipText = dataItem.High.ToString();//}//e.ToolTipText = "Hi"; }

 


    

private void LoadBarChart() { chart.View.AreaType = ChartAreaType.Cartesian; chart.AngleTransform = 90; RangeBarSeries rangeBarSeries = new RangeBarSeries(); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/17/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 30, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/18/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/18/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/19/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 89, DateTime.Now.TimeOfDay.TotalMinutes - 100, "5/20/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/20/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 79, DateTime.Now.TimeOfDay.TotalMinutes - 90, "5/21/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/21/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/22/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/22/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/23/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/23/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/25/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/24/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/26/2021")); rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/26/2021")); CategoricalAxis horizontalAxis = new CategoricalAxis(); horizontalAxis.ClipLabels = false; horizontalAxis.ShowLabels = false; //horizontalAxis.LabelRotationAngle = -90;//horizontalAxis.LabelFitMode = AxisLabelFitMode.Rotate; horizontalAxis.PlotMode = AxisPlotMode.BetweenTicks; rangeBarSeries.HorizontalAxis = horizontalAxis; chart.View.Series.Add(rangeBarSeries); chart.View.ShowToolTip = true; chart.View.ShowTrackBall = true; ChartTooltipController tooltipController = new ChartTooltipController(); tooltipController.DataPointTooltipTextNeeded += tooltipController_DataPointTooltipTextNeeded; this.chart.View.Controllers.Add(tooltipController); rangeBarSeries.VerticalAxis.LabelFormatProvider = new MyFormatProvider(); rangeBarSeries.VerticalAxis.ClipLabels = false; rangeBarSeries.VerticalAxis.LabelRotationAngle = -45; rangeBarSeries.VerticalAxis.LabelFitMode = AxisLabelFitMode.Rotate; LinearAxis verticalAxis = chart.View.Axes.Get<LinearAxis>(1); verticalAxis.Minimum = 0; //Minutes 0:00 verticalAxis.Maximum = 1380; //Minutes 23:00 verticalAxis.MajorStep = 60; //60 minutes in an hour }

 

 private void tooltipController_DataPointTooltipTextNeeded(object sender, DataPointTooltipTextNeededEventArgs e)
        {
            RangeDataPoint dp = e.DataPoint as RangeDataPoint;
            if (dp != null)
            {
                e.Text = dp.High + " " + dp.Low;
            }
        }


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
13 views
I wanted to set the width to a fixed size for bar rather than auto width set by telerik
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
12 views

I have created a RadGridView and added custom column to display ChartView in it. I am using SetContentCore method to filter data for each row. 

The above feature works fine, but I face one problem. Whenever we try to resize the parent window manually, the SetContentCore method getting called repeatedly which in turn creates multiple chart element within one column.

Please help to find which event triggers this method call, so that I can disable the same.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
5 views

I would like to prevent users from zooming in/out on RadMap. 

Is there any way to disable the zooming option?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Jun 2021
1 answer
12 views

Hi ,

I am using RadGridView - Telerik.WinControls.GridView(2015.1.331.40) and using CellFormating event . The backcolor doesnt work here whereas the forecolor works . Am i missing anything ?

The code attached:


   private void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
            // e.CellElement.ForeColor works though
             e.CellElement.BackColor = Color.Red;
            
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Jun 2021
1 answer
21 views

Hi ,

I am trying to create a page with 3 columns. Date and Percent are the first 2 columns . The 3rd column will be a range bar chart where the time span across 24 hours will be in x-axis (orientation to the top) and the date again will be on the left (we can hide the label) . It might not necessarily be a gridview , but if it is that would be great . Let me attach the mock , I tried to do the 2 columns separately and the chart separately but wanted to integrate it as a single grid . 

 

Much appreciated for the help in advance.

Sample Code that i did to achieve the chart (Grid view is pretty straight forward and ignored in the below code):

 


  private void LoadBarChart()
        {

            this.radChartView1.AreaType = ChartAreaType.Cartesian;
            this.radChartView1.ChartElement.AngleTransform = 90;
            RangeBarSeries rangeBarSeries = new RangeBarSeries("End Time", "Start Time", "Summarization Date");

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "6/8/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "6/8/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "6/8/2021"));


            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 30, DateTime.Now.TimeOfDay.TotalMinutes + 10, "6/7/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "6/7/2021"));



            CategoricalAxis horizontalAxis = new CategoricalAxis();

            //horizontalAxis.Title = "Summarization Days";
            horizontalAxis.ClipLabels = false;
            horizontalAxis.LabelRotationAngle = -90;
            horizontalAxis.LabelFitMode = AxisLabelFitMode.Rotate;

            horizontalAxis.PlotMode = AxisPlotMode.BetweenTicks;
            rangeBarSeries.HorizontalAxis = horizontalAxis;


            this.radChartView1.Series.Add(rangeBarSeries);

            rangeBarSeries.VerticalAxis.LabelFormatProvider = new MyFormatProvider();
            //rangeBarSeries.VerticalAxis.Title = "Time of the day";
            rangeBarSeries.VerticalAxis.ClipLabels = false;
            rangeBarSeries.VerticalAxis.LabelRotationAngle = -90;
            rangeBarSeries.VerticalAxis.LabelFitMode = AxisLabelFitMode.Rotate;

            LinearAxis verticalAxis = radChartView1.Axes.Get<LinearAxis>(1);
            verticalAxis.Minimum = 0; //Minutes 0:00
            verticalAxis.Maximum = 1380; //Minutes 23:00
            verticalAxis.MajorStep = 60; //60 minutes in an hour

            CartesianArea area = this.radChartView1.GetArea<CartesianArea>();
            area.ShowGrid = true;

            CartesianGrid grid = area.GetGrid<CartesianGrid>();
            grid.DrawVerticalStripes = true;
            grid.DrawHorizontalStripes = false;
        }


        public class MyFormatProvider : IFormatProvider, ICustomFormatter
        {
            public object GetFormat(Type formatType)
            {
                return this;
            }
            public string Format(string format, object arg, IFormatProvider formatProvider)
            {
                int totalminutes = Convert.ToInt32(arg);

                TimeSpan timeSpan = TimeSpan.FromMinutes(totalminutes);

                return timeSpan.ToString(@"hh\:mm");
            }
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Jun 2021
4 answers
28 views

I am trying to implement a RangeBarSeries chart where time in y axis and date in x axis . The time here will be total minutes ranged against.

Example 1876 to 18:30 but only for label purpose and not for actual calculation.

 

 

Image 2

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Jun 2021
1 answer
12 views

I created  ItemElementBlank class that is used for two separate types in the property editor. I want to display no text next to the property label. It works properly when properties are collapsed. When one of the properties are expanded seems that my display element is used in the wrong row ("OdstÄ™p linii" instead of "Alarm"). I coloured the control to a yellow gradient for a better view.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Jun 2021
1 answer
15 views

Greetings,

I've been using Rad controls  for a long time in my projects ( including mostly buttons, labels and gridview ) without facing noticeable GUI issues , though I sometimes face an Anti-aliasing issue of controls in all of my forms ( in a single project), and I have no idea what's the matter.

More surprising is the wired solution I found out to the issue and that's to add a random new rad control to one of the forms, such as  a button or a label. I attached 2 pictures that can illustrate the issue and the solution I described :

"Before.jpg" illustrates a rad button with "Tahoma" font; there is Anti-aliasing issue (sharp edges of letters in Text)

"After.jpg" illustrates a rad button with "Tahoma" font and a fresh new rad button added to the form;  there is no Anti-aliasing issue

 

P.S :

1- The issue involves not just the rad button, but also labels, gridviews (and maybe some other rad controls too).

2- Font  can't be the cause of the issue as I've tried using different fonts and it didn't make any difference.

3- I don't manually (dynamically) set or unset the Anti-aliasing feature of the rad controls

4- The newly added Rad control must be present (and visible!) in one of the forms  to solve the issue, otherwise the issue remains.

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Jun 2021
5 answers
41 views

Hello,

I have a project where I'd like to use Nodes to deliver an interface where users can link up different nodes to create something called a 'rule'. I've found several options out there with Unity's nodes being the most visually appealing. Does Telerik have anything like this? I wasn't able to find anything but thought I'd ask.

I've attached a screenshot of an open source node framework based on Unity's node system.

 

Thanks,

Michael

Nadya
Telerik team
 answered on 08 Jun 2021
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
ChartView
ComboBox and ListBox (obsolete as of Q2 2010)
Buttons, RadioButton, CheckBox, etc
Chart (obsolete as of Q1 2013)
DropDownList
ListView
PageView
Form
MultiColumn ComboBox
TextBox
Menu
PropertyGrid
RichTextEditor
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
Carousel
ListControl
Panorama
PdfViewer and PdfViewerNavigator
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
AutoCompleteBox
VirtualGrid
Label
ContextMenu
Panel
Visual Studio Extensions
Documentation
TitleBar
SplitContainer
DesktopAlert
Rotator
TrackBar
ProgressBar
Map
SpinEditor
StatusStrip
MessageBox
ShapedForm
CheckedListBox
CheckedDropDownList
LayoutControl
CAB Enabling Kit
CollapsiblePanel
Spreadsheet
Conversational UI, Chat
Wizard
ScrollablePanel
TextBoxControl
WaitingBar
BrowseEditor
DateTimePicker
GroupBox
TabbedForm
Tools - VSB, Control Spy, Shape Editor
ImageEditor
DataEntry
Gauges (RadialGauge, LinearGauge, BulletGraph)
FileDialogs
ScrollBar
ApplicationMenu
ColorDialog
RangeSelector
DataFilter
CardView
SyntaxEditor
BindingNavigator
PopupEditor
Barcode
ColorBox
Callout
CalculatorDropDown
DataLayout
VirtualKeyboard
WebCam
ValidationProvider
BreadCrumb
FontDropDownList
PictureBox
RibbonForm
Styling
TimePicker
ToastNotificationManager
Accessibility
ButtonTextBox
Licensing
Localization
Rating
Security
Separator
SparkLine
TimeSpanPicker
+? more
Top users last month
Psyduck
Top achievements
Rank 4
Bronze
Iron
Iron
Om Pushkara deep
Top achievements
Rank 2
Iron
Iron
Iron
Valery
Top achievements
Rank 1
Iron
Peter
Top achievements
Rank 1
Veteran
Iron
George C.
Top achievements
Rank 2
Iron
Veteran
Top users last month
Psyduck
Top achievements
Rank 4
Bronze
Iron
Iron
Om Pushkara deep
Top achievements
Rank 2
Iron
Iron
Iron
Valery
Top achievements
Rank 1
Iron
Peter
Top achievements
Rank 1
Veteran
Iron
George C.
Top achievements
Rank 2
Iron
Veteran