This project is read-only.

Help:Problem with line graph

Feb 15, 2013 at 2:07 AM
Edited Feb 15, 2013 at 2:08 AM
Hello everyone I'm from Peru, I have searched a lot on the forums but have not given me the solution.

Supposedly everything is fine in my code to generate a line graph but does not generate the chart.

I leave my code to see if help me please, something must be wrong.

Thank you very much.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <script type="text/javascript" src=""></script>
    <script src="" type="text/javascript"></script>
    <script src="" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var options = {
                chart: {
                    renderTo: 'container',
                    defaultSeriesType: 'line'
                title: {},
                xAxis: {},
                yAxis: {},
                series: []

                type: "POST",
                dataType: "json",
                data: "{}",
                contentType: "application/json; charset=utf-8",
                url: "WebForm1.aspx/getData",
                success: function (items) {

                    var obj = eval(items.d);

                    var series2 = { data: [] };

                    $.each(obj, function (index, value) {



                cache: false,
                error: function (XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); }

            chart = new Highcharts.Chart(options);
    <div id="container" style="width: 800px; height: 400px; margin: 0 auto">
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Web.Services
Imports Newtonsoft.Json
Class WebForm1
    Inherits System.Web.UI.Page

    <WebMethod(EnableSession:=True)> _
    Public Shared Function getData() As String

        Dim cn As New SqlConnection("Data source=.;initial catalog=Prueba;uid=sa;pwd=.")
        Dim cmd As New SqlCommand("select * from data", cn)
        Dim dr As SqlDataReader
        dr = cmd.ExecuteReader

        Dim data As List(Of ArrayList) = New List(Of ArrayList)

        While dr.Read
            Dim a As New ArrayList
        End While

        Dim str As String = JsonConvert.SerializeObject(data)

        Return str
__//RETURN [[15.00],[42.00],[100.00],[18.00],[16.00],[13.00],[18.00],[57.00],[90.00],[95.00],[96.00],[120.00]]__
    End Function
End Class