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

[Solved] Chart control not working properly

0 Answers 23 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
H
Top achievements
Rank 1
H asked on 18 Jun 2012, 10:10 AM

I’m using Telerik MVC Q2 2011 with Visual Basic and MVC2 with .Net Framework 3.5

I’m trying to get the Chart control to work as in the Demos but I’m having some problems

First, "telerik.examples.css" and "telerik.examples.js" files doesn’t exist.
Second, in the ScriptRegistrar if I tried to add the .Render() as in the demos I get 
BC30518: Overload resolution failed because no accessible 'Write' can be called with these arguments
Third, after omitting the functions that doesn’t work I get the chart but the color of the series doesn’t change if I hover on it as in the Demos.
Fourth, I can’t seem to find Transitions() function, it doesn’t exist for me.
Fifth, I’m not able to convert .OnDocumentReady(() => { %>prettyPrint();<% }) to work with VB and the converter at http://converter.telerik.com/ doesn’t solve the problem either.
BTW, I had to use Q2 2011 SP1 to get the tooltip and label format to work as mentioned here http://www.telerik.com/community/forums/aspnet-mvc/general/q2-2011-sp1.aspx

The code for the chart is as follows 
<%= Html.Telerik.Chart(CType(Model, IEnumerable(Of TestMVCandF.Models.SalesData))).Name("Chart1") _
                           .Series(Function(series) series.Bar(Function(s) s.RepSales).Name("Representative Sales")) _
                           .Series(Function(series) series.Bar(Function(s) s.TotalSales).Name("Total Sales")) _
                           .CategoryAxis(Function(axis) axis.Categories(Function(d) d.DateString)) _
                           .ValueAxis(Function(axis) axis.Numeric().Labels(Function(l) l.Format("${0:#,##0}"))) _
                           .Tooltip(Function(tooltip) tooltip.Visible(True).Format("${0:#,##0}")) _
                           .Legend(Function(legend) legend.Position(ViewData("LegendPosition")).Visible(ViewData("ShowLegend"))) _
                           .SeriesDefaults(Function(series) series.Bar().Stack(ViewData("Stack"))) _
                           .Title(Function(title) title.Text("Representative Sales vs. Total Sales").Visible(ViewData("ShowTitle"))).Theme("Vista") _
                           .HtmlAttributes(New With {.style = "width: 600px; height: 400px;"})%>
Thanks in advance.
Tags
Chart
Asked by
H
Top achievements
Rank 1
Share this question
or