Hi ,
I am defining the vertical axis' set of axis labels by defining min max and major step . Even though i set it , it takes some non relevant values like 100,200....1128.5 etc before starting from 0,60,120... Code attached:
rangeBarSeries.VerticalAxis.LabelFormatProvider = new MyFormatProvider();
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
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");
}
}
Hi,
I need to change the height of popup as shown in attached image file, when the dropdown arrow is clicked and popup is shown along with "Close" button.
I have implemented this control exactly as per CustomDropDownList code mentioned in the link:
Please help me with the modification needed.
I do not want to use AutoSize, as the DataSource of dropdown is huge.
Thanks
Nishant
Hi ,
I am trying to hide the last label in y-axis which is kind of inverted but i have attached the image and code for the same
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.PlotMode = AxisPlotMode.BetweenTicks;
rangeBarSeries.HorizontalAxis = horizontalAxis;
chart.View.Series.Add(rangeBarSeries);
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 = 1440; //Minutes 23:00
verticalAxis.MajorStep = 60; //60 minutes in an hour
verticalAxis.LastLabelVisibility = AxisLastLabelVisibility.Hidden;
}
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");
}
}
Is it possible to add your own operators to the list of valid radvalidatorprovider's own operators. I have a requirement for two operators:
1. See if a value is already contained with a Dictionary object, if so the operator should cause the validation to fail.
2. See if a folder path specified in a textboxcontrol exists on dick. If not, then the validation should fail.
I know I could do this in code, and simply display a dialog stating the error, but I want consistent validation reporting throughout my application.
Greetings,
Is there a way to hide some of the items of the radgridview filter box, or not showing the filter icon at all (marked with red circles in the attached picture) ?
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;
}
}
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.
I would like to prevent users from zooming in/out on RadMap.
Is there any way to disable the zooming option?
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;
}