How to plot line chart start from 1000 value

4 posts, 0 answers
  1. Mohsin
    Mohsin avatar
    28 posts
    Member since:
    Feb 2011

    Posted 18 Jun 2012 Link to this post

    Hi Team,

    I want my line chart to start ploting from 1000 value default. Please see attached image.
    No matter what is comming from database.

    Urgent response will be appreciated.

    Thanks,
    Mohsin
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 19 Jun 2012 Link to this post

    Hi Mohsin,

    To achieve this you could use the valueAxis min property, which sets the minimum value of the axis. Another approach is to filter the data and display the values which are over the appointed range.   

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Mohsin
    Mohsin avatar
    28 posts
    Member since:
    Feb 2011

    Posted 03 Jul 2012 Link to this post

    Hi Iliana,

    Min property doesn't work for me. 

    I need vertical axis to start with 0 and data point always start with 1000 means on horizontal axis the data point always start with 1000 default no matter what values are coming database.

    Below link shows a line chart, vertical axis start with 0 and horizontal axis start with 0. I need horizontal axis to start with 0 and plot the datapoint at 1000 on vertical axis.

    http://www.kendoui.com/ClientsFiles/366939_default-start.jpg 

    I need this to be done on urgent basis.
    Please do the needful or if you can provide me some sample project it would be really good for me.

    Thanks
    Mohsin
  4. Mohsin
    Mohsin avatar
    28 posts
    Member since:
    Feb 2011

    Posted 03 Jul 2012 Link to this post

    here is my chart code

    var chartdata = JSON.parse('<%=ChartData%>')
            var myValue1 = new Array();
            var myValue2 = new Array();
            var myYear = new Array();
            var fundName = '<%= _fundName %>';
            for (i = 0; i < chartdata.Table.length; i++) {
                myValue1[i] = chartdata.Table[i].Value;
                myValue2[i] = chartdata.Table[i].Value1;
                myYear[i] = chartdata.Table[i].Year;
            }
            $("#MyLineChart").kendoChart({
                theme: $(document).data("kendoSkin") || "BlueOpal",
                seriesDefaults: {
                    type: "line" ,
                    border: { width: 0 },
                    margin: 0,
                    width: 1,
                    markers: { visible: false }
                },
                series: [{
                    name: "Series 1",
                    data: myValue1,
                    visibleInLegend: true,
                    color: "#43AEDE"
                }, {
                    name: "Series 2",
                    data: myValue2,
                    visibleInLegend: true,
                    color: "#AABBCC",
                    labels: { visible: false }
                }],
                valueAxis: {
                    labels: { format: null, font: "9px Arial" },
                    majorGridLines: { width: 0, color: "#336699", visible: false },
                    minorGridLines: { visible: false }
                },
                legend: { position: "bottom" },
                categoryAxis: {
                    categories: myYear,
                    labels: { rotation: 90, font: "9px Arial" },
                    line: {
                        visible: false,
                        width: 2
                    },
                    majorGridLines: { visible: false },
                    minorGridLines: { visible: false }
                },
                tooltip: { visible: true, format: "{0}" }
            });
Back to Top