Is it possible to have a stacked graph where the y axis labels only show to inticate teh top of each part of the stack, eg 143 then next shows at 159 (based ont eh 2nd value of 16) and so on?
I thought, seeing as you can specify each "series" step that it might be doable but its not working for me
Here is a snapshot of my code: graphEmailAlerts.DataSource = eAdatatable
graphEmailAlerts.DataBind()
graphEmailAlerts.Visible = True
graphEmailAlerts.Appearance.FillStyle.BackgroundColor = Drawing.Color.Transparent
'Y axis
graphEmailAlerts.PlotArea.YAxis.AxisCrossingValue = 0
graphEmailAlerts.PlotArea.YAxis.Color = Drawing.Color.Black
graphEmailAlerts.PlotArea.YAxis.MajorTickType = HtmlChart.TickType.Outside
graphEmailAlerts.PlotArea.YAxis.MinorTickType = HtmlChart.TickType.None
Dim totalvalue = eAdatatable.Rows(0).Item("value1") + eAdatatable.Rows(0).Item("value2") + eAdatatable.Rows(0).Item("value3")
graphEmailAlerts.PlotArea.YAxis.MinValue = 0
graphEmailAlerts.PlotArea.YAxis.MaxValue = CDec((Math.Ceiling((totalvalue * 1.2) / 100) * 100))
graphEmailAlerts.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0} "
graphEmailAlerts.PlotArea.YAxis.LabelsAppearance.RotationAngle = "0"
graphEmailAlerts.PlotArea.YAxis.LabelsAppearance.Skip = "0"
'X-axis
graphEmailAlerts.PlotArea.XAxis.AxisCrossingValue = 0
graphEmailAlerts.PlotArea.XAxis.Color = Drawing.Color.Black
graphEmailAlerts.PlotArea.XAxis.MajorTickType = HtmlChart.TickType.Outside
graphEmailAlerts.PlotArea.XAxis.MinorTickType = HtmlChart.TickType.None
graphEmailAlerts.PlotArea.XAxis.DataLabelsField = "type"
graphEmailAlerts.PlotArea.XAxis.Reversed = False
graphEmailAlerts.PlotArea.XAxis.BaseUnit = HtmlChart.DateTimeBaseUnit.Auto
graphEmailAlerts.PlotArea.XAxis.LabelsAppearance.DataFormatString = "{0} "
graphEmailAlerts.PlotArea.XAxis.LabelsAppearance.RotationAngle = "0"
graphEmailAlerts.PlotArea.XAxis.LabelsAppearance.Skip = "0"
graphEmailAlerts.PlotArea.XAxis.LabelsAppearance.Step = "1"
graphEmailAlerts.PlotArea.Series.Clear()
Dim cs_ss As New ColumnSeries()
cs_ss.Stacked = "true"
cs_ss.DataFieldY = "value1"
cs_ss.LabelsAppearance.Step = eAdatatable.Rows(0).Item("value1")
cs_ss.LabelsAppearance.Position = HtmlChart.BarColumnLabelsPosition.Center
cs_ss.LabelsAppearance.DataFormatString = "Saved Searches {0}"
cs_ss.Appearance.FillStyle.BackgroundColor = Drawing.Color.FromArgb(165, 213, 162)
cs_ss.TooltipsAppearance.DataFormatString = "Saved Searches {0}"
graphEmailAlerts.PlotArea.Series.Add(cs_ss)
If eAdatatable.Rows(0).Item("value2") <> 0 Then
Dim cs_tracked As New ColumnSeries()
cs_tracked.Name = "Tracked"
cs_tracked.Stacked = "true"
cs_tracked.DataFieldY = "value2"
cs_tracked.LabelsAppearance.Position = HtmlChart.BarColumnLabelsPosition.Center
cs_tracked.LabelsAppearance.DataFormatString = "Tracked {0}"
cs_tracked.Appearance.FillStyle.BackgroundColor = Drawing.Color.FromArgb(255, 181, 110)
cs_tracked.TooltipsAppearance.DataFormatString ="Tracked {0}"
cs_tracked.LabelsAppearance.Step = eAdatatable.Rows(0).Item("value1") + eAdatatable.Rows(0).Item("value2")
graphEmailAlerts.PlotArea.Series.Add(cs_tracked)
End IfI have a situation(s) where trying to display RadHtmlChart in different parts of the page.
When I put the RadHtmlChart towards the top, all displays fine (charts with bound or non bound data).
As soon as put RadGrid on page graphs before rad grid will still render, but any RadHtmlChart that follows displays empty.
whether try changes in .aspx/code behind/javascript can't seem to get anything to render properly.
In case this isn't a me issue but version issue: Telerik version 2015.3.xxxxx
protected override void Render(HtmlTextWriter writer){ if (IsReadOnly) { Label lblValue = new Label(); string display = "--"; if (!string.IsNullOrEmpty(this.SelectedText)) { display = this.SelectedText; } lblValue.Text = display; lblValue.RenderControl(writer); } else { base.Render(writer); }}Is it possible to create a stacked column chart and show the steps on axis but the labels on the right axis (instead of a legend)
I am programmatically creating a graph but I only have one set to data to show so didn't think i could use an additional axis?, Showing the label on the column itself is not displayed well if the data is wildly differing, eg 5421 and then 16
Thanks
I am trying to understand what configuration controls the paragraph style behaviour when enter is hit.
If I have applied any of the "Header 1" to "Header 6" paragraph styles, when I enter, the paragraph style is reset back to normal. The same happens if I use the <address> paragraph style.
However, most of the other paragraph styles do not reset but continue to leave it applied. Any custom paragraph style I add also leave the style applied when enter is hit.
Is there a configuration setting that is applied that determines which paragraph styles are reset and which ones are not when enter is hit?
I am trying to use ExportToPdf to generate a .pdf document from a RadGrid. Here's a simplified version of my grid. The labels export to the .pdf, but the table with "TGIF" does not. I need to use HTML formatting to arrange the labels. What am I doing wrong? Thanks!
<telerik:RadGrid ID="gridTest" runat="server" AutoGenerateColumns="False"
Skin="Default" Width="800px"
OnItemCreated="gridTest_ItemCreated" >
<ExportSettings
IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="False">
<Pdf PaperSize="Letter"></Pdf>
</ExportSettings>
<MasterTableView ShowHeader="false">
<Columns>
<telerik:GridTemplateColumn DataField="strCaseID" UniqueName="strCaseID" ShowFilterIcon="false" >
<ItemTemplate>
<table>
<tr>
<td>
TGIF!
</td>
</tr>
</table>
<asp:Label ID="lbName" runat="server" Text='<%#Eval("strEmployeeFName")%>' ></asp:Label><br />
<asp:Label ID="lbAddressStreet1" runat="server" Text='<%#Eval("strEmployeeAddressStreet1")%>' ></asp:Label><br />
<asp:Label ID="lbAddressStreet2" runat="server" Text='<%#Eval("strEmployeeAddressStreet2")%>' ></asp:Label><br />
<asp:Label ID="lbAddressCity" runat="server" Text='<%#Eval("strEmployeeAddressCity")%>' ></asp:Label><br />
<asp:Label ID="lbAddressState" runat="server" Text='<%#Eval("strEmployeeAddressState")%>' ></asp:Label><br />
<asp:Label ID="lbAddressZip" runat="server" Text='<%#Eval("strEmployeeAddressZip")%>' ></asp:Label><br />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
in Page_Load...
PopulateGrid(gridTest);
ConfigureGridBeforeExportToPdf();
gridTest.MasterTableView.ExportToPdf();
protected void gridTest_ItemCreated(object sender, GridItemEventArgs e)
{
try
{
ConfigureGridItem(e.Item);
}
catch (Exception ex)
{
// do stuff
}
}
protected void ConfigureGridItem(GridItem item)
{
// ***** THIS IS FOR - each Item
item.Style["color"] = "purple"; // font color
if (item is GridHeaderItem)
{
item.Visible = false;
}
else if (item is GridDataItem)
{
item.Style["vertical-align"] = "middle";
item.Style["text-align"] = "left";
}
switch (item.ItemType)
{
case GridItemType.Item: item.Style["background-color"] = "lightyellow"; break;
case GridItemType.AlternatingItem: item.Style["background-color"] = "mistyrose"; break;
}
}
public void ConfigureGridBeforeExportToPdf()
{
// ***** THIS IS FOR - entire Grid
// format - Pdf Settings
gridTest.ExportSettings.Pdf.BorderType = GridPdfSettings.GridPdfBorderType.OuterBorders;
gridTest.ExportSettings.Pdf.BorderStyle = GridPdfSettings.GridPdfBorderStyle.Thick;
gridTest.ExportSettings.Pdf.BorderColor = System.Drawing.Color.HotPink;
gridTest.ExportSettings.Pdf.PaperSize = GridPaperSize.Letter;
gridTest.ExportSettings.Pdf.PageHeight = Unit.Parse("162mm");
gridTest.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm");
// format - header
GridItem headerItem = gridTest.MasterTableView.GetItems(GridItemType.Header)[0];
headerItem.Visible = false;
// format - footer
gridTest.ExportSettings.Pdf.PageFooter.MiddleCell.Text = "<?page-number?>";
gridTest.ExportSettings.Pdf.PageFooter.MiddleCell.TextAlign = GridPdfPageHeaderFooterCell.CellTextAlign.Center;
}
Using ASP.NET AJAX is there a control to display XML\JSON code? Formatted and colored?
Thanks Brian
Hello,
I have a grid with one of column defined as below, now I want to use HeaderContextMenu to show the filter option but the input is textbox instead of DateTime which should have a small calendar icon on the right side. I have tried manually showing and hiding the textbox by using below jquery at ShowMenu event but the filter just doesn't take value from my input datepicker. Can you show me how to do that?
$('[id$=DPFirstCond_wrapper]').show();$('[id$=DPSecondCond_wrapper]').show();$('[id$=TBFirstCond_wrapper]').hide();$('[id$=TBSecondCond_wrapper]').hide();
<telerik:GridTemplateColumn SortExpression="StartDate" UniqueName="StartDate" DataType="System.DateTime" HeaderText="Complan Eff. Date" DataField="StartDate"> <HeaderStyle Width="180px"></HeaderStyle> <ItemTemplate> <div runat="server" class='<%# ComPlanCssClass(Eval("StartDate"), Eval("ComPlanPending.StartDate"), Eval("ComPlanPending"))%>'> <asp:Label Text='<%# ComPlanValue(Eval("StartDate"), Eval("ComPlanPending.StartDate"), Eval("ComPlanPending"))%>' runat="server" /> </div> </ItemTemplate> </telerik:GridTemplateColumn>
Hi sir
I create radhtmlbar chart dynamically created using below code i have two column series one for task and another lateaction i give color dynamically that color not update in legend
How we handle this situation.
Dim chart2 As New RadHtmlChart
chart2.ID = "chart2"
chart2.ChartTitle.Text = "Employee Efficiency (KPI)"
chart2.PlotArea.XAxis.LabelsAppearance.RotationAngle = 100
chart2.PlotArea.XAxis.DataLabelsField = _ChartSeriesFieldTitlexaxis2
chart2.PlotArea.Series.Clear()
chart2.PlotArea.XAxis.LabelsAppearance.RotationAngle = 0
Dim series4 As New ColumnSeries
series4.DataFieldY = _ChartDataFieldTitle2
series4.Name = "Total task(s)"
series4.LabelsAppearance.DataFormatString = "{0} Task(s)"
chart2.PlotArea.Series.Add(series4)
Dim series66 As New ColumnSeries
series66.DataFieldY = _ChartDataFieldTitle23
series66.Name = "Late action(s)"
series66.LabelsAppearance.DataFormatString = "{0} Task(s)"
chart2.PlotArea.Series.Add(series66)
Dim strrec As String = ""
series4.ColorField = "ColorRange"
series66.ColorField = "ColorRange1"
chart2.Legend.Appearance.Visible = True
chart2.Legend.Appearance.Position = ChartLegendPosition.Top
firstTable2.Columns.Add("ColorRange", Type.GetType("System.String"))
firstTable2.Columns.Add("ColorRange1", Type.GetType("System.String"))
Dim cosos2 As Integer = 0
For Each row As DataRow In firstTable2.Rows
row("ColorRange") = _Colors1(cosos2)
row("ColorRange1") = _Colors2(cosos2)
Next