Hi , help to change the RadChart To RadHtmlChart for line chart series , below is the existing code used RadChart . i need to update to RadHtmlChart
hartAnalysis_BLL objBLL = new ChartAnalysis_BLL();
DataTable dt = objBLL.GetMonthlySSMTotalQuantityImported(arrParameters);
// Create new chart
RadChart2.ChartTitle.TextBlock.Appearance.TextProperties.Font = new System.Drawing.Font(RadChart2.ChartTitle.TextBlock.Appearance.TextProperties.Font.FontFamily, 11, System.Drawing.FontStyle.Bold);
RadChart2.ChartTitle.TextBlock.Text = "Extended Monthly SSM Total Quantity Imported \n(" + ssm[0] + ")";
RadChart2.Width = AppConstants.CONST_CHART_WIDTH;
RadChart2.ChartTitle.Visible = true;
RadChart2.Chart.DefaultType = ChartSeriesType.Line;
RadChart2.PlotArea.Appearance.Dimensions.Margins.Left = Telerik.Charting.Styles.Unit.Percentage(10);
RadChart2.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Charting.Styles.Unit.Percentage(15);
RadChart2.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Charting.Styles.Unit.Percentage(30);
RadChart2.DataManager.ValuesXColumn = "Date";
RadChart2.DataManager.ValuesYColumns = new string[1] { "SSM Quantity" };
RadChart2.IntelligentLabelsEnabled = true;
RadChart2.DataSource = dt;
RadChart2.DataBind();
RadChart2.Skin = AppConstants.CONST_TELERIK_CHARTSKIN;
RadChart2.PlotArea.XAxis.Clear();
RadChart2.PlotArea.XAxis.IsZeroBased = false;
RadChart2.PlotArea.XAxis.AutoScale = false;
RadChart2.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.ShortDate;
RadChart2.PlotArea.XAxis.Appearance.CustomFormat = "MMM yy";
RadChart2.PlotArea.XAxis.AxisLabel.Visible = true;
RadChart2.PlotArea.XAxis.AxisLabel.TextBlock.Text = "Month \n(" + AppFunctions.GetDisclaimer() + ")";
RadChart2.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Black;
RadChart2.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -45;
RadChart2.PlotArea.YAxis.AxisLabel.Visible = true;
RadChart2.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Total Quantity of SSM Imported (" + dt.Rows[0]["UOM"] + ")";
RadChart2.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Black;
RadChart2.Series.GetSeries(0).Appearance.PointMark.Dimensions.Width = 1;
RadChart2.Series.GetSeries(0).Appearance.PointMark.Dimensions.Height = 1;
RadChart2.Series.GetSeries(0).Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Black;
RadChart2.Series.GetSeries(0).Appearance.PointMark.FillStyle.FillType = FillType.Solid;
RadChart2.Series.GetSeries(0).Appearance.PointMark.Visible = true;
RadChart2.Series.GetSeries(0).Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Orange;
RadChart2.Series.GetSeries(0).Appearance.LineSeriesAppearance.Width = 3;
int intYear = dt_SelDateFrom.Year;
int intMonth = dt_SelDateFrom.Month;
DateTime start = new DateTime(intYear, intMonth, 1);
TimeSpan ts = dt_SelDateTo - dt_SelDateFrom;
int intMthDiff = Convert.ToInt32(Math.Ceiling((ts.TotalDays / 30)));
for (int i = 0; i < intMthDiff; i++)
{
ChartAxisItem item = new ChartAxisItem();
item.Value = (decimal)start.AddMonths(i).ToOADate();
RadChart2.PlotArea.XAxis.AddItem(item);
}
DataTable dt_avg = objBLL.GetSSMTotalImportedLastYearAverage(arrParameters);
// Define chart series
ChartSeries avg_series = new ChartSeries();
avg_series.Appearance.LabelAppearance.Visible = false;
avg_series.Name = "Last Year Average";
avg_series.Type = ChartSeriesType.Line;
avg_series.Appearance.PointMark.Dimensions.Width = 1;
avg_series.Appearance.PointMark.Dimensions.Height = 1;
avg_series.Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Black;
avg_series.Appearance.PointMark.FillStyle.FillType = FillType.Solid;
avg_series.Appearance.PointMark.Visible = true;
avg_series.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Red;
foreach (DataRow row in dt_avg.Rows)
{
foreach (DataColumn col in dt_avg.Columns)
{
Decimal dec_data = Convert.ToDecimal(row[col]);
Double dbl_data = Convert.ToInt32(dec_data);
avg_series.AddItem(dbl_data);
}
}
RadChart2.AddChartSeries(avg_series);
ArrayList arrParameterBaseline = new ArrayList();
arrParameterBaseline.Add(dt_SelBaselineFrom);
arrParameterBaseline.Add(dt_SelBaselineTo);
arrParameterBaseline.Add(dt_SelSSMSeqID);
SqlDataReader dr_baseline = objBLL.GetSSMTotalImportedBaseline(arrParameterBaseline);
ChartSeries baseline_series = new ChartSeries();
baseline_series.Appearance.LabelAppearance.Visible = false;
baseline_series.Name = "Baseline Average";
baseline_series.Type = ChartSeriesType.Line;
baseline_series.Appearance.PointMark.Dimensions.Width = 1;
baseline_series.Appearance.PointMark.Dimensions.Height = 1;
baseline_series.Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Black;
baseline_series.Appearance.PointMark.FillStyle.FillType = FillType.Solid;
baseline_series.Appearance.PointMark.Visible = true;
baseline_series.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Chartreuse;
Double dbl_baseline = 0;
if (dr_baseline == null)
{
dbl_baseline = 0;
}
else
{
try
{
while (dr_baseline.Read())
{
if (dr_baseline["TotalImportedBaseline"] == DBNull.Value)
dbl_baseline = 0;
else
{
Decimal dec_baseline = dr_baseline.GetDecimal(dr_baseline.GetOrdinal("TotalImportedBaseline"));
dbl_baseline = Convert.ToDouble(dec_baseline);
}
}
}
catch (Exception ex)
{
AppFunctions.SetMessageError(this.Page, AppConstants.CONST_ERROR_LOAD_CHART);
AppFunctions.ErrorLog(ex);
}
finally
{
if (dr_baseline != null)
{
dr_baseline.Close();
dr_baseline.Dispose();
}
}
}
for (int i = 0; i < intMthDiff; i++)
{
baseline_series.AddItem(dbl_baseline);
}
RadChart2.AddChartSeries(baseline_series);
Panel1.Controls.Add(RadChart2);
}
catch (Exception ex)
{
AppFunctions.SetMessageError(this.Page, AppConstants.CONST_ERROR_LOAD_CHART);
AppFunctions.ErrorLog(ex);
}
args.get_eventTargetElement() in OnRequestStart event returns null when Paging the Grid initiates an AjaxRequest via AjaxManager
How do I determine if the event target is a RadGrid?
The following code leads to a JavaScript error
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="requestStart">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
JavaScript
function requestStart(sender, args) {
var target = args.get_eventTargetElement();
if (target.className.indexOf("RadGrid") > -1) {
// RadGrid control
}
}
Initially empty Signature has no value -> signatureObject.value() returns undefined. When the control is focused it gets a default value representing the blank background of the signature pad.
Validating the Signature based on its value gets quite complex as it requires considering this default base64string.
It would be great if the control would provide functionality to validate for mandatory user input
If one wants to read the resulting signature server-side (after a button-click / form submission), one kind of has to work with a lot of javascript and hidden input fields to transfer the base64-encoded png towards the server. It would be way nicer if you could provide the content of the signature as a server-side property of the RadSignature-control (during post-back).
If you paint a stroke on the canvas, then "maximize" the RadSignature-control (effectively zooming in on the control) and then paint a second stroke, you'll see that those strokes will have a different line width; the second one being bigger.
If you repeatedly maximize/minimize the RadSignature control and draw a stroke each time on the bottom of the canvas, then the resulting image will get distorted.
If one opens a dialog/window containing a RadSignature-control and resizes the dialog (e.g. make it twice as large) then the position of the cursor on the canvas does not match the position of the strokes anymore. Painting in the top-left corner is sort of okay/close, but the further one moves the cursor towards the bottom-right, the bigger the offset will be.
See similar requests from the forums:
Hi,
A Feature suggestion to develop a drag-drop Interactive Forms builder, rather than programmatically design a Form. This Feature would simplify and reduce design time to create an Interactive Form for a Designer/User and could be directly integrated into existing applications.
Alan
Dear staff I know this post
https://www.telerik.com/support/code-library/detecting-changes-to-the-radeditor
But in any case the component RadEditor have the method 'OnTextChanged' in the client side.
Probably, id it doesn't works, is better to remove it.
Thanks
Renato
Scenario: Server paging and filtering are enabled for RadMultiSelect.
Currently, the Selected item is not displayed within the drop-down even if it is still selected in the control.
The expected behavior is to have all selected items in the dropdown even when they are not part of the currently filtered set of items.
We have noticed that when you choose 'Yearly' in the recurrence editor that the text 'Recur every' shows up twice in the editor. If you change it to 'Monthly' or any other type of recurrence, this does not happen, and the text only shows up once.
The issue can be replicated in Binding to Generic List live demo.
Hi Team,
I would like to request the following image file extensions to be displayable using the RadEditor's ImageManager/DocumentManager.
Thank you!
Would it be possible to include an additional button with a feature that allows a user to Type their signature (e.g., like in MS Paint, you can still type and it saves as an image).
Applying styles to the rows when exporting to PDF causes the Grid to duplicate the column headers at page breaks.
Currently, when the grid is set to:
<ClientSettings EnablePostBackOnRowClick="true">
The post back will be fired even if the clicked row is already selected, which sometimes is not good.
To solve this we need to write a javascript event on rowclick to cancel the event if the row is already selected, but it will be nice to have this as a built in setting like
<ClientSettings EnablePostBackOnRowClick="true" PostBackOnRowClickOnSelectedRow="false">
Thanks,
ilan.
When EnableLinqGrouping is set to True (default) Group Aggregates do not have Case sensitive calculations.
The RadSignature has the option to reset the contents of the signature but it would be great to make an event like a OnReset or OnClear so I can set the status of other objects on my page.
RadImageGallery is a great control and supports many image formats out of the box (JPEG, PNG, BMP, etc.)
However, it does not provide native support for HEIF. HEIF is now the default format for most Apple devices (anything after iOS 11 update).
It would be great if RadImageGallery were updated to provide support for this format so that developers don't have to force image conversions of photos taken by Apple devices.