Kendo chart does not display remote data

2 posts, 0 answers
  1. maryam
    maryam avatar
    4 posts
    Member since:
    Jan 2015

    Posted 10 Feb 2015 Link to this post

    Hello all,

    I'm trying to bind my data (web api using entity framework 6) but still the generated chart shows no data only title and chart area.

    I have something similier to this code:

    <script type="text/javascript">
    function createChart() {
    $("#chart").kendoChart({
    dataSource: {
    transport: {
    read: {
    url: "http://localhost:*****/api/ISLFWs",
    dataType: "json"
    }
    },
    sort: {
    field: "Year",
    dir: "asc"
    }
    },
    title: {
    text: "Test"
    },
    legend: {
    position: "top"
    },
    seriesDefaults: {
    type: "column"
    },
    series:
    [{
    field: "ActualPSE",
    name: "Actual PSE"
    }, {
    field: "TargetPSE",
    name: "Target PSE"
    },

    {

    }],
    categoryAxis: {
    field: "Year",
    labels: {
    rotation: -90
    },
    majorGridLines: {
    visible: false
    }
    },
    valueAxis: {
    labels: {
    format: "N0"
    },
    majorUnit: 10000,
    line: {
    visible: false
    }
    },
    tooltip: {
    visible: true,
    format: "N0"
    }
    });
    }

    $(document).ready(createChart);
    $(document).bind("kendo:skinChange", createChart);

    </script>
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 10 Feb 2015 Link to this post

    Hello Maryam,

    The request might be failing for some reason. Can you inspect the request in your browser console or using fiddler and let us know of the status code of the request?

    Regards,
    Genady Sergeev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top