How can i customize the text in legend. am using telerik tools. how can i change the legend text from the back end? c# or vb.net code is enough. as per the customer requirement i need to display combined text from x axis and y axis are to be displayed in the legend. following is the code am using for this.
<telerik:radchart id="radchart_teamchart" autolayout="true" charttitle-appearance-fillstyle-fillsettings-imagealign="Center"
chartimageformat="Png" charttitle-visible="true" seriesorientation="Vertical"
width="900px" defaulttype="Bubble" runat="server" skin="Vista" autotextwrap="true"
intelligentlabelsenabled="true">
<ChartTitle TextBlock-Text="My New Customer Status">
</ChartTitle>
<Series>
<telerik:ChartSeries DataYColumn="noofcustomer" Name="Order" Type="Bar" Appearance-BarWidthPercent="10">
<Appearance LabelAppearance-Visible="false">
<TextAppearance TextProperties-Font="Cambria, 8.25pt" Position-AlignedPosition="TopLeft">
</TextAppearance>
<FillStyle MainColor="DarkOrange" SecondColor="WhiteSmoke" FillType="Gradient">
</FillStyle>
<PointMark Visible="True" Border-Width="2" Border-Color="DarkKhaki" Dimensions-AutoSize="false"
Dimensions-Height="10px" Dimensions-Width="6px">
<FillStyle MainColor="Red" FillType="solid">
</FillStyle>
</PointMark>
<LineSeriesAppearance Width="6"></LineSeriesAppearance>
</Appearance>
</telerik:ChartSeries>
</Series>
<PlotArea>
<XAxis DataLabelsColumn="month" AxisLabel-Visible="true" AxisLabel-TextBlock-Text="Month"
AxisLabel-TextBlock-Appearance-TextProperties-Color="Brown">
<Appearance>
<TextAppearance TextProperties-Font="Arial, 8.25pt, style=Bold" Dimensions-Paddings="0.5px">
</TextAppearance>
<LabelAppearance RotationAngle="270">
</LabelAppearance>
</Appearance>
</XAxis>
<YAxis AxisMode="Normal" MaxItemsCount="7" AxisLabel-Visible="true" AxisLabel-TextBlock-Text="No Of Cusotmers"
AxisLabel-TextBlock-Appearance-TextProperties-Color="Brown">
<Appearance>
<TextAppearance TextProperties-Font="Arial, 8.5pt, style=Bold">
</TextAppearance>
</Appearance>
</YAxis>
</PlotArea>
<Legend Visible="true" ></Legend>
</telerik:radchart>
I do not think that's what a legend is for and thus, I do not think you can do this.
I would advise that you first go through the control documentation and explore the available properties to see whether something is useful for you:
http://www.telerik.com/help/aspnet-ajax/chart-styling-custom-appearance-properties.html
http://www.telerik.com/help/aspnet-ajax/chart-styling-elements.html
http://www.telerik.com/help/aspnet-ajax/chart-legenddisplaymode.html - note the ItemLabels option that puts the items in the legend
http://www.telerik.com/help/aspnet-ajax/chart-legend.html - there are also some options on building custom legends, so this can help
Another idea is to build a custom legend from your data source. You can see a sample approach here http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx even though the chart is the current RadHtmlChart control (RadChart is deprecated in favor of this newer chart control).
Related
So i was trying telerik:RadHtmlChart to try make my chart more Responsive so that when the user resize the screen the chart resize too , but it is not working ..in the code they write ""
but when i try to put it in my code its say that 'ClientEvents not supported ' any one know whey i checked the web.config and its seem fine
help
<div class="demo-container">
<telerik:RadHtmlChart runat="server" ID="BarChart" Height="300px" Width="100%">
<ClientEvents OnLoad="chartLoad" />
<PlotArea>
<XAxis>
<Items>
<telerik:AxisItem LabelText="Item 1"></telerik:AxisItem>
<telerik:AxisItem LabelText="Item 2"></telerik:AxisItem>
<telerik:AxisItem LabelText="Item 3"></telerik:AxisItem>
</Items>
</XAxis>
<Series>
<telerik:BarSeries Name="Series 1">
<SeriesItems>
<telerik:CategorySeriesItem Y="25"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="-12"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="39"></telerik:CategorySeriesItem>
</SeriesItems>
</telerik:BarSeries>
<telerik:BarSeries Name="Series 2">
<SeriesItems>
<telerik:CategorySeriesItem Y="-15"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="38"></telerik:CategorySeriesItem>
<telerik:CategorySeriesItem Y="-11"></telerik:CategorySeriesItem>
</SeriesItems>
</telerik:BarSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
</div>
The following online resources show how to make RadHtmlChart responsive:
Responsive Telerik RadHtmlChart
https://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/responsive-chart/defaultcs.aspx
https://www.telerik.com/support/code-library/radhtmlchart-in-a-responsive-web-page
window.onresize = function () {
$find("<%=RadHtmlChart1.ClientID%>").get_kendoWidget().resize();
}
The link contains an example of richfaces 4 popuppanel:
richfaces popuppanel example
Here is the code:
<rich:toolbar height="26px" id="tb">
<rich:toolbarGroup location="right">
<h:outputLink value="#">
<rich:componentControl event="click" operation="show" target="ls">
<a4j:param name="event" value="event" noEscape="true" />
<rich:hashParam>
<a4j:param noEscape="true" name="top"
value="jQuery(#{rich:element('tb')}).offset().top + jQuery(#{rich:element('tb')}).height()" />
<a4j:param noEscape="true" name="left"
value="jQuery(#{rich:element('tb')}).offset().left + jQuery(#{rich:element('tb')}).width() - p_width" />
</rich:hashParam>
</rich:componentControl>
Search
</h:outputLink>
</rich:toolbarGroup>
</rich:toolbar>
<rich:popupPanel header="Enter Search Terms" id="ls" autosized="true" modal="false" moveable="false" resizeable="false" followByScroll="false" >
<h:panelGrid columns="3">
<h:outputText value="Search:" />
<h:inputText />
<h:outputLink onclick="#{rich:component('ls')}.hide(event); return false;" value="#">Search
</h:outputLink>
</h:panelGrid>
</rich:popupPanel>
<h:outputScript type="text/javascript" target="body">
p_width = #{rich:component('ls')}.width();
</h:outputScript>
But the popup is appearing in random places, i.e. sometimes under the bar, and then have to scroll and sometimes above. Is it possible to make sure it always appears right above the bar while being attached to it?
The top and left parameters set the position of the panel, change them to where you want the panel to be, or call the method directly:
RichFaces.component('panelId').show(null, {top: "800px", left: "500px"})
You're using the part of the example that specifically sets the panel under the bar so it shouldn't be surprising when the panel appears there.
i'm using jqgrid asp.net component .how can i change a filed width and height (text box or combo) in add and edit dialog boxes?
Thank you
At the last im found it
1 you need to specify edittype attribute
2 after that specify editfiled attributes tag
for text area
<trirand:JQGridColumn DataField="Remarks" HeaderText="Remarks" Editable="true" EditType="TextArea">
<Formatter>
<trirand:CustomFormatter FormatFunction="formatRating" UnFormatFunction="unformatRating" />
</Formatter>
<EditFieldAttributes>
<trirand:JQGridEditFieldAttribute Name="cols" Value="80" />
<trirand:JQGridEditFieldAttribute Name="rows" Value="6" />
</EditFieldAttributes>
</trirand:JQGridColumn>
for text box
<trirand:JQGridColumn DataField="Design" HeaderText="Design" Editable="true" EditDialogFieldSuffix=" (MAX - 10)">
<Formatter>
<trirand:CustomFormatter FormatFunction="formatRating" UnFormatFunction="unformatRating" />
</Formatter>
<EditFieldAttributes>
<trirand:JQGridEditFieldAttribute Name="size" Value="2" />
</EditFieldAttributes>
</trirand:JQGridColumn>
This button causes a lot of problems for my client, as it always uses a predefined Schema. I can't find a way to remove this button with my Editor config. I have done this with other buttons, but these buttons are implemented in some sort of sub-group.
On my personal sandbox machine, I tried removing the commented out control in the extract of the ../WebUI/Editors/CME/Controls/Toolbars/Tabs/CreateRibbonPage.ascx file shown below:
<c:RibbonSplitButton runat="server" CommandName="NewComponent"
Title="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>"
Label="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>"
ID="NewComponentBtn1">
<c:RibbonContextMenuItem runat="server" ID="NewComponentCMI2"
Command="NewComponent"
Title="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>"
Label="<%$ Resources: Tridion.Web.UI.Strings, NewComponent %>" />
<c:RibbonContextMenuItem runat="server" ID="NewMultimediaComponentCMI2"
Command="NewMultimediaComponent"
Title="<%$ Resources: Tridion.Web.UI.Strings, NewMultimediaComponent %>"
Label="<%$ Resources: Tridion.Web.UI.Strings, NewMultimediaComponent %>" />
<!--
<c:RibbonUploadContextMenuItem runat="server"
ID="NewBasicMultimediaComponentCMI2" Command="NewBasicMultimediaComponent"
Title="<%$ Resources: Tridion.Web.UI.Strings, NewBasicMultimediaComponent %>"
Label="<%$ Resources: Tridion.Web.UI.Strings, NewBasicMultimediaComponent %>" />
-->
</c:RibbonSplitButton>
This seems to have the desired result, but I imagine that this will probably invalidate our support agreement if I did this in a customer environment. Is this possible to do in a supported way, or do I have to hack the UI files like this to achieve my goal?
One of the solutions is to create extension for the NewBasicMultimediaComponent command, which extends isAvailable and isEnabled methods and returns false for them. In this case "Upload MM Component" still will be present as an option for "New Component" button, but it will be disabled.
I've used css to hide the display of ribbon items before. Purely because I couldn't find the appropriate solution.
I'm adding this answer because I needed to do something similar with a complete ribbon toolbar.
I needed to remove the complete ribbon toolbar "Create" in order to add a simpler version of it and it seems you can do the removal part by creating a new extension and use this in your extensions config:
<?xml version="1.0"?>
<Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge" xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration" xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions" xmlns:cmenu="http://www.sdltridion.com/2009/GUI/extensions/ContextMenu" xmlns:edt="http://www.sdltridion.com/2009/GUI/Configuration/Merge">
<resources>
<cfg:groups />
</resources>
<definitionfiles />
<extensions>
<ext:editorextensions>
<ext:editorextension target="CME">
<ext:editurls />
<ext:listdefinitions />
<ext:itemicons />
<ext:taskbars />
<ext:commands />
<ext:commandextensions />
<ext:contextmenus />
<ext:lists />
<ext:tabpages>
</ext:tabpages>
<ext:toolbars>
</ext:toolbars>
<ext:ribbontoolbars>
<ext:remove>
<ext:extension id="CreatePage">
<ext:apply>
<ext:view name="DashboardView">
<ext:control id="DashboardToolbar" />
</ext:view>
</ext:apply>
</ext:extension>
</ext:remove>
</ext:ribbontoolbars>
<ext:extendedareas />
</ext:editorextension>
</ext:editorextensions>
<ext:dataextenders />
</extensions>
<commands />
<contextmenus />
<localization />
<settings>
<dependencies />
<defaultpage />
<editurls />
<listdefinitions />
<theme>
<path>/Themes/</path>
</theme>
<customconfiguration />
</settings>
</Configuration>
To make this work for buttons you probably can do the same thing (haven't tested this), by providing the button id in the ext:extension id attribute.
I have a have an asp:Menu and i am using css classes to format this menu.
<asp:Menu ID="MenuMain" runat="server" DataSourceID="SiteMapDataSource"
Orientation="Horizontal" RenderingMode="List" SkinID="None"
IncludeStyleBlock="false" StaticDisplayLevels="1">
<StaticMenuStyle CssClass="nav" />
<StaticSelectedStyle CssClass="active" />
<LevelSubMenuStyles>
<asp:SubMenuStyle CssClass="level1" />
<asp:SubMenuStyle CssClass="level2" />
</LevelSubMenuStyles>
However asp.net dynamically adds the inline styles and divs that are generated by javascript associated to the menu.
Is there anyway to prevent this ?
Add your own css class with different names and associate them with this in CssClass
<StaticMenuStyle CssClass="nav" />
<StaticSelectedStyle CssClass="active" />
<LevelSubMenuStyles>
<asp:SubMenuStyle CssClass="level1" />
<asp:SubMenuStyle CssClass="level2" />
</LevelSubMenuStyles>
Hope it helps.
Don't forget to upvote it if it solves you problem.
Thanks.. :)