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

Consuming WCF with an Area Chart througth a sql database

0 Answers 44 Views
Charts
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 15 Nov 2012, 07:28 PM
i need help with this, im trying to make a area char with sources coming of a sql database y have a wcf service,  and the chart dont show me nothing

<div id="GAreaCPagos" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
    </div>
    <script type="text/jscript">


        function graficaCPagos() {

            $("#GAreaCPagos").kendoChart({
                theme: $(document).data("kendoSkin") || "default",
                dataSource: {
                    schema: {
                        data: "d", 
                        model: { 
                            fields: {
                                IDPAGOS: { type: "number" },
                                CANTPAGOS: { type: "number" }
                            }
                        }
                    },


                    transport: {


                        read: {
                            url: "ServicePagos.svc/ObtenerPagos",
                            contentType: "application/json; charset=utf-8", 
                            type: "POST" 
                        }
                    }
                },


                title: {
                    text: "Cantidad de Pagos",
                    color: "#848484"
                },


                legend: {
                    visible: true
                },


                seriesDefaults: {
                    type: "area"
                },


                series: [{ field: "CANTPAGOS"}],
                valueAxis: {
                    labels: {
                        format: "{0}"
                    }
                },


                categoryAxis: {
                    field: "IDPAGOS"
                },
                tooltip: {
                    visible: true,
                    format: "{0} Id"
                }
            });
        }

        $(document).ready(function () { var x = 0; graficaCPagos(); })
        
        
    </script>

help me please

No answers yet. Maybe you can help?

Tags
Charts
Asked by
David
Top achievements
Rank 1
Share this question
or