locked
Multiple WCF calls in single HTML page? RRS feed

  • Question

  • User48651432 posted

    I know this isn't the forum for this, but Kendo forums are slow and I've always felt that MS forums are always more attentive to forums users.

    I have an HTML page with several Kendo sparkline charts. For every chart, I create a datasource and bind it to my WCF service. More or less the following for each sparkline:

    <script>
    	function createSparklinesTech1Carrier1() {
    		alert('alert');
            var rowDataSource1 = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "http://localhost:3118/Service1.svc/GetSites?Technology=MyTech1&carrier=1"",
    					type: 'GET',
    					jsonpCallback: 'callback',
    					dataType: "jsonp"
                    }
                }
            });
            $("#1c-log").kendoSparkline({
                    dataSource: rowDataSource3,
                    series: [{
                        type: "area",
                        field: "count",
                        color: "Magenta"
                    }]
                });
    	}
        $(document).ready(createSparklinesTech1Carrier1);
    </script>

    It's the same call, but with different parameters. The problem is that, without the ALERT popup, the sparklines are very erratic; it's as if a page refresh is done and all the sparklines aren't filled. It looks like the following:

    If the ALERT is added, they are all displayed correctly.

    Any help is appreciated.

    Thanks.

    Tuesday, July 16, 2013 6:25 PM

Answers

  • User48651432 posted

    That's an error I made while uploading the code. I call the function at the bottom.

    I've fixed the code.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 17, 2013 9:01 AM

All replies

  • User-488622176 posted

    When do you call this function : 

    createSparklinesTech1Carrier1 
    Wednesday, July 17, 2013 7:17 AM
  • User48651432 posted

    That's an error I made while uploading the code. I call the function at the bottom.

    I've fixed the code.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 17, 2013 9:01 AM