This is a migrated thread and some comments may be shown as answers.

Chart frustration

10 Answers 142 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 2
Brad asked on 27 Mar 2009, 12:21 AM
I am trying to put together what I consider is a very simple chart. I have a SQL data source setup that returns 15 rows of 4 columns. Column 1-3 are numeric values, column 4 is a text string. I want a simple bar chart with col1 plotted against the left Y axis and col2 and col3 plotted against the right Y axis. The X axis should be the labels in col4. In 3 hours of playing with a RADChart I have been unable to accomplish this. I've been thru the Trainer video and tried to figure out what is what in the RADChart pdf.
What I have gotten is the chart shrinking down to a 14X16 pixel box. After a resize of the chart the center plot area says there is no or an empty series. I've tried autosize and manually entering entering labels on the X axis and all I ever get is 7 labels. Is there anyone who can give me a simple walkthrough of how to accomplish this?

Thanks,

JB

10 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 30 Mar 2009, 08:12 AM
Hello Joe,

You can achieve the desired functionality like this (note that you need to replace the DataColumn names "data1", "data2", "data3", "text" with the respective column names from your datasource, and you need to change the RadChart.DataSourceID to the respective name of your datasource):

<telerik:RadChart ID="RadChart1" runat="Server" AutoLayout="True" DataSourceID="SqlDataSource1"
    <Series> 
        <telerik:ChartSeries DataYColumn="data1" Name="Series 1" /> 
        <telerik:ChartSeries DataYColumn="data2" Name="Series 2" YAxisType="Secondary" /> 
        <telerik:ChartSeries DataYColumn="data3" Name="Series 3" YAxisType="Secondary" /> 
    </Series> 
    <PlotArea> 
        <XAxis DataLabelsColumn="text" /> 
    </PlotArea> 
</telerik:RadChart> 
 
<asp:SqlDataSource ID="SqlDataSource1" runat="Server" ConnectionString="<%$ ConnectionStrings:testConnectionString %>" 
    SelectCommand="SELECT [data1], [data2], [data3], [text] FROM [TestTable]" /> 


Hope this helps.


Regards,
Manuel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Brad
Top achievements
Rank 2
answered on 30 Mar 2009, 06:53 PM
Manuel,

Thanks for the code but I still wish the interface was a little easier to use and I still can't get a second Y axis setup without using code like what you've supplied. But there is another issue which is pretty annoying. There is no need to send screen shots on this because it's not repeatable but very random. Here are some example, all of them return either a dialog box stating that an Object Reference to an Instance of the Object could not be found or the object shrinks down to a box where the object was with the same message. If I undo it the object comes back. There are a lot of things that trigger this behaviour. Trying to enter a new width value on the properties panel, a different chart title, a position or margin and sometimes trying to modify a value in the Telerik properties window or selecting Chart Wizard. Sometimes if I do it a second time it will work but most of the time the only way to get around it is to save and restart VS, then whatever was causing the issue works and something else will do the same thing until I restart. The only thing that seems to be immune to this behaviour is editing or writing code. I can find no repeatable process in this randomness.

Thanks for the code again,

Joe B
0
Giuseppe
Telerik team
answered on 01 Apr 2009, 11:24 AM
Hi Joe,

You are correct -- secondary YAxis cannot be set up through the wizard and you need to either customize it from code or from the property grid.

As for the property grid issues -- recently our developers were able to track and fix problems with changing values from the property grid that are similar to your observations. The fix will be included in the official service pack release that is due by the end of the week.

Sorry for the temporary inconvenience.


Sincerely yours,
Manuel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Brad
Top achievements
Rank 2
answered on 01 Apr 2009, 12:58 PM
Manuel,

Thanks for the update. At least it's not something I'm doing wrong with properties. As far as setting things through code that is not a show stopper if I know that's what I have to do. Since I am very new at Telerik and VS for code (I do a lot of SSIS packages) I appreciate your patience with me.

Thanks,

Joe B
0
Brad
Top achievements
Rank 2
answered on 01 Apr 2009, 01:26 PM
Manuel,

I am daunted by the amount of information available so rather than search thru it all I going to ask for your help getting me pointed to the right docs. We've made the decision to implement RadControls but the website that we want to implement them at are on a VERY secure server so I will have to setup Telerik by moving what I've done manually. Can I get an idea of what needs to go where? I know I need to change some of the paths but what else needs to go over to make everything work?

Thanks,

Joe B
0
Giuseppe
Telerik team
answered on 03 Apr 2009, 03:37 PM
Hi Joe,

You should be able to perform XCOPY deployment of your application on the production server as all resources necessary to run the control are embedded in the Telerik.Web.UI assembly that you are referencing from your /bin folder.


Regards,
Manuel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Brad
Top achievements
Rank 2
answered on 06 Apr 2009, 02:05 PM
Manuel,

NOPE. But there is another nasty little twist here. We have put up a new server for this application so I went on my down;pad and downloads page and got the latest rev of RadControls. The interface is different and the content I developed on my local server gives me errors on the new server. If I build the content from scratch it works file but I have a dozen or so pages that are fairly complex and would hate to have to rebuild them all.
One other note; I can't seem to get the rows of a grid to be a smaller height. I have gone thru the docs and videos but can't find the correct property to set to change the row height. Any help here?

Thanks,

Joe B
0
Giuseppe
Telerik team
answered on 09 Apr 2009, 10:42 AM
Hi Joe,

Unfortunately based on the provided information we are unable to provide solution for your build issues -- please elaborate on this issue and give us with some error details so we can advise you properly.

As for setting the grid row height -- you can achieve it like this:

<telerik:RadGrid ID="RadGrid1" runat="Server" OnNeedDataSource="RadGrid1_NeedDataSource"
    <ItemStyle Height="30px" /> 
</telerik:RadGrid> 


More information on customizing row appearance can be found here.


All the best,
Manuel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Brad
Top achievements
Rank 2
answered on 09 Apr 2009, 03:17 PM
Thanks Manuel.

I did some reading and I think the issue is more with the "hidden" properties of padding, font size, borders and so on because I have tried the Height = "10pix" tag and it still doesn't change the height. I can work with that but there is another issue I'd like to mention. In both RadChart and RadGrid when in the wizards trying to set a backgound color throws an "Object Reference not valid" I can set the color in the code or the normal properties but not in a dialog.

Joe B
0
Giuseppe
Telerik team
answered on 13 Apr 2009, 07:54 AM
Hi Joe,

Unfortunately we are unable to reproduce the problematic behavior in our local tests -- changing BackColor for RadGrid works seamlessly from the Wizard, and there is no option to change the background color for RadChart from its Wizard unless we are missing something out.

Attached is our test application -- please give it a spin and let us know how to reproduce the erroneous issues if the problem persists (the application uses the latest version of the controls released last week).


Regards,
Manuel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Brad
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
Brad
Top achievements
Rank 2
Share this question
or