Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
Hello,

I'm graphing measurement results on a line with RadChart.  My problem is that the YAxis always starts at zero for the graph.  Many of the results may be between 0 and 1.   If the results are always 0, the graph always shows on the bottom of the graph along the X axis.

I'd like to make the YAxis start at say -5 so that the line is graphed in the middle of the graph instead across the bottom Xaxis.

I've played with YAxis Min/Max values, autoscale=false, and nothing seems to change the YAxis from starting at zero.

I've included my radchart definiation in the HTML and code behind pages.

Example results from my stored procedure that I'm graphing:
CollectDate,Reported Result, low range, high range
02/11/2008,      0,     0,    20 
03/10/2009,      1,     0,   20
04/10/2009,     1.5,   0 ,  20
05/10/2009,     1,      0 ,  20

Any help would be appreciated.

Thanks,

Mitch
<telerik:RadChart ID="RadChart1" runat="server" DataSourceID="SqlDataSource3"  
            DefaultType="Line" Skin="DeepBlue" Width="750px" Height="225px"  
            AutoLayout="True" EnableTheming="True"> 
            <Series> 
<telerik:ChartSeries Name="Reported Result"  
                    DataYColumn="Reported Result" Type="Line"  > 
    <Appearance> 
        <FillStyle MainColor="213, 247, 255" FillType="ComplexGradient"> 
            <FillSettings> 
                <ComplexGradient> 
                    <telerik:GradientElement Color="213, 247, 255" /> 
                    <telerik:GradientElement Color="193, 239, 252" Position="0.5" /> 
                    <telerik:GradientElement Color="157, 217, 238" Position="1" /> 
                </ComplexGradient> 
            </FillSettings> 
        </FillStyle> 
        <TextAppearance TextProperties-Color="White"> 
        </TextAppearance> 
    </Appearance> 
                </telerik:ChartSeries> 
</Series> 
            <PlotArea> 
                <XAxis AutoScale="False" DataLabelsColumn="collectdate" MaxValue="7"  
                    MinValue="1" Step="1" IsZeroBased="true"> 
                    <Appearance  TextAppearance-TextProperties-Font="Arial, 8.25pt, style=Bold"  
                        Color="98, 183, 226" MajorTick-Color="98, 183, 226"> 
                        <MajorGridLines Color="98, 183, 226" Width="0" Visible="false"/> 
                        <TextAppearance TextProperties-Color="White"> 
                        </TextAppearance> 
                    </Appearance> 
                    <AxisLabel> 
                        <Appearance Dimensions-Paddings="1px, 1px, 10%, 1px"> 
                        </Appearance> 
                        <TextBlock> 
                            <Appearance TextProperties-Color="LightSkyBlue"> 
                            </Appearance> 
                        </TextBlock> 
                    </AxisLabel> 
                   <Items> 
                        <telerik:ChartAxisItem Value="1"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                        <telerik:ChartAxisItem Value="2"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                        <telerik:ChartAxisItem Value="3"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                        <telerik:ChartAxisItem Value="4"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                        <telerik:ChartAxisItem Value="5"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                        <telerik:ChartAxisItem Value="6"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                        <telerik:ChartAxisItem Value="7"> 
                            <TextBlock Text="abc"> 
                                <Appearance TextProperties-Font="Arial, 8.25pt, style=Bold"> 
                                </Appearance> 
                            </TextBlock> 
                        </telerik:ChartAxisItem> 
                    </Items> 
                    
                </XAxis> 
                <YAxis AutoScale="false"> 
                    <Appearance Color="98, 183, 226" MajorTick-Color="98, 183, 226"  
                        MinorTick-Color="98, 183, 226"> 
                        <MajorGridLines Color="120, 209, 248" /> 
                        <MinorGridLines Color="120, 209, 248" Width="0" /> 
                        <TextAppearance TextProperties-Color="White"> 
                        </TextAppearance> 
                    </Appearance> 
                    <AxisLabel> 
                        <TextBlock> 
                            <Appearance TextProperties-Color="LightSkyBlue"> 
                            </Appearance> 
                        </TextBlock> 
                    </AxisLabel> 
                </YAxis> 
                <Appearance Dimensions-Margins="19%, 90px, 12%, 9%"> 
                    <FillStyle MainColor="50, 255, 255, 255" SecondColor="Transparent"> 
                    </FillStyle> 
                    <Border Color="97, 180, 223" /> 
                </Appearance> 
            </PlotArea> 
            <Appearance> 
                <FillStyle FillType="ComplexGradient"> 
                    <FillSettings> 
                        <ComplexGradient> 
                            <telerik:GradientElement Color="26, 120, 179" /> 
                            <telerik:GradientElement Color="35, 189, 254" Position="0.5" /> 
                            <telerik:GradientElement Color="26, 120, 179" Position="1" /> 
                        </ComplexGradient> 
                    </FillSettings> 
                </FillStyle> 
                <Border Color="0, 66, 110" Width="5" /> 
            </Appearance> 
            <ChartTitle> 
                <Appearance Dimensions-Margins="4%, 10px, 14px, 6%"> 
                    <FillStyle MainColor=""> 
                    </FillStyle> 
                </Appearance> 
                <TextBlock Text=""> 
                    <Appearance TextProperties-Font="Verdana, 14pt" TextProperties-Color="White"> 
                    </Appearance> 
                </TextBlock> 
            </ChartTitle> 
            <Legend Visible="False"> 
                <Appearance Dimensions-Margins="1px, 2%, 12%, 1px" Visible="False"> 
                    <ItemTextAppearance TextProperties-Color="White"> 
                    </ItemTextAppearance> 
                    <FillStyle GammaCorrection="False" MainColor="37, 255, 255, 255"> 
                    </FillStyle> 
                    <Border Color="76, 255, 255, 255" /> 
                </Appearance> 
                <TextBlock> 
                    <Appearance Position-AlignedPosition="Top" TextProperties-Color="LightSkyBlue"> 
                    </Appearance> 
                </TextBlock> 
            </Legend> 
        </telerik:RadChart> 

Protected Sub RadChart1_BeforeLayout(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadChart1.BeforeLayout 
        Dim HiZone As Decimal 
        Dim LoZone As Decimal 
' Get Hi and Lo limits for result 
        HiZone = GetZoneHi(cboParam.SelectedValue, Request("EquipmentID"), Request("SampleNumber")) 
        LoZone = GetZoneLow(cboParam.SelectedValue, Request("EquipmentID"), Request("SampleNumber")) 
 
        RadChart1.Series(0).Appearance.PointMark.Dimensions.AutoSize = False 
        RadChart1.Series(0).Appearance.PointMark.Dimensions.Width = 8 
        RadChart1.Series(0).Appearance.PointMark.Dimensions.Height = 8 
        RadChart1.Series(0).Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Black 
        RadChart1.Series(0).Appearance.PointMark.Visible = True 
 
 
        Dim markedzone As ChartMarkedZone = New ChartMarkedZone 
        markedzone.ValueStartY = LoZone 
        markedzone.ValueEndY = HiZone 
        markedzone.Appearance.FillStyle.MainColor = Drawing.Color.Gray 
 
        RadChart1.PlotArea.MarkedZones.Add(markedzone) 
 
 
        RadChart1.PlotArea.YAxis.MaxValue = (HiZone * 0.25) + HiZone  ' *10 
        RadChart1.PlotArea.YAxis.MinValue = -5 
        RadChart1.PlotArea.YAxis.AutoScale = True 
        Dim markedzone2 As ChartMarkedZone = New ChartMarkedZone 
 
        markedzone2.ValueStartY = 0 
        markedzone2.ValueEndY = LoZone 
        markedzone2.Appearance.FillStyle.MainColor = Drawing.Color.LightCoral 
        RadChart1.PlotArea.MarkedZones.Add(markedzone2) 
 
 
        Dim markedzone3 As ChartMarkedZone = New ChartMarkedZone 
 
        markedzone3.ValueStartY = HiZone 
        markedzone3.ValueEndY = HiZone + (HiZone * 0.25) 
        markedzone3.Appearance.FillStyle.MainColor = Drawing.Color.LightCoral 
        RadChart1.PlotArea.MarkedZones.Add(markedzone3) 
 
        RadChart1.Chart.Legend.Visible = False 
        RadChart1.AutoLayout = True 
 
                 
End Sub 
Mitch
Top achievements
Rank 1
 answered on 18 Sep 2009
4 answers
170 views
Hi,

I have a bizzare problem with my rad menu.

My rad menu is fixed or remaining static i.e. even if you scroll down in the page also the Rad menu is in same position.

Is this the default behaviour?Do i have to set any property explicitly so that this is not happening?

Regards,
Raj
Atanas Korchev
Telerik team
 answered on 18 Sep 2009
1 answer
118 views
Hello,

I've been trying to find a way to execute a client-side script after successful upload of files from the FileExplorer upload. I was hoping you could help me with this.

I'm not sure if any of my code is needed, do ask if it is.

The closest solution I've managed to find so far is by using the "OnClientSubmitting" on the RadProgressManager. But the problem with this one is that it's executed even when you click the other buttons on FileExplorer, for example Refresh, Delete etc.

I hope I was clear enough.

Thanks in advance
/Cristoffer
Patrik Holmberg
Top achievements
Rank 1
 answered on 18 Sep 2009
1 answer
111 views

Hi.

I have a radgrid with a one detailtable, inside this detail, i have two radcombox, in the insert of the new row, i'm trying to populate the second radcombox with the value from the first radcombox using the event OnSelectedindexChanged, but i'm not getting find the control radcombobox, i'm using the code bellow , but i know that this code is wrong, because I know I need to get index of the line,  but i don't how to get. Could you help-me?

 sqlTarget.SelectCommand = "SELECT* FROM tb_tar_target where  and mov_c_divisao = '" & CType(rdgWorkFlow.MasterTableView.DetailTables(0).FindControl("rdbnil_c_divisao"), RadComboBox).SelectedItem.Text

 CType(rdgWorkFlow.MasterTableView.DetailTables(0).FindControl("rdbnil_tar_n_codigo"), RadComboBox).DataSource = sqlTarget
 CType(rdgWorkFlow.MasterTableView.DetailTables(0).FindControl("rdbnil_tar_n_codigo"), RadComboBox).DataBind()

excuse-me by my english

thanks

Fabio

Princy
Top achievements
Rank 2
 answered on 18 Sep 2009
1 answer
251 views
Hi,

I have a MasterView Table set up with LINQ datasource. (Customers)

It has a detail View  ( Orders)
    Which has it's own detail View ( OrderLine).

I have the grid working great but my end users do not like clicking to expand the Customer and then expand the Order and then
expand the Orderline to get to the third level. They feel it is too many clicks.

I there a way I can automate the expansion and the databinding events downwards from the top level to mid to last ?
Any suggestions on the best way to get this done?
Princy
Top achievements
Rank 2
 answered on 18 Sep 2009
2 answers
187 views

I have used RadMenu version 2009.1.414.20, I want to set height of the RadMenu so that scroll will appear if menu items exceeds from mentioned height.

By using EnableAutoScroll="true" i am able to get scrollbar with respect to screen height but i want to set height of the RadMenuItems.
Below is the code, which i have used.


<

 

telerik:RadMenu Skin="Custom" EnableEmbeddedSkins="false" BorderWidth="0px" ID="RadMenu1" EnableScreenBoundaryDetection="false" EnableAutoScroll="true" EnableRootItemScroll="true"

 

 

runat="server" DataTextField="ScreenName" DataValueField="ScreenID" DataFieldID="ScreenID"

 

 

DataFieldParentID="ParentID" OnItemDataBound="RadMenu1_ItemDataBound" OnItemClick="RadMenu1_ItemClick">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadMenu>

Let me know if you have any solution?

 

Meghna
Top achievements
Rank 1
 answered on 18 Sep 2009
1 answer
129 views
How do I avoid calling NeedDataSource during ItemCommand execution ie, insert, update and cancel?

Thanks
Princy
Top achievements
Rank 2
 answered on 18 Sep 2009
1 answer
108 views
I have a linq query that returns a list of locations. Is it possible to bind the query results to a gridDropdown from the code behind ? I have the gridDropDown on that aspx page, but am not sure if i have to do everything from the back end or if there is just a setting i can do in the back end to populate the dropdown.  if so can someone show me a sample of how it would be done.. I am totally drawing a blank on this one.

Thanks
Gina
Princy
Top achievements
Rank 2
 answered on 18 Sep 2009
0 answers
96 views
I am building RadPanelBar using Database. In ascx page, I just have root like below

        <telerik:RadPanelBar
            runat="server" ID="RadPanelBar1"
            ExpandMode="FullExpandedItem">
            <Items>
            </Items>
        </telerik:RadPanelBar> 

In ItemDataBound, I am adding RadPanelItem, and itemtemplate using ItemTemplate = new MyTemplateClass()

In MyTemplateClass,

public void InstantiateIn(System.Web.UI.Control container)
// Here I am adding RadGrid and other controls dynamically.

All the code above in ASCX page (Usercontrol)

Question:
1. How to pass a value to RowDrop handler of dynamic RadGrid (which is inside the dynamically created radpanelitem) from aspx web page?
Venkat Ganesh
Top achievements
Rank 1
 asked on 18 Sep 2009
7 answers
446 views
Is there a way to turn off the Mouse Wheel Incrementation in the RadDatePicker similar to the property IncrementSettings-InterceptMouseWheel="False" in the RadNumericTextbox for a RadGrid and FormView?

I have not been able to find any docmentation that shows this.

Thanks, Robin
Raam Nandan
Top achievements
Rank 1
 answered on 18 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?