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

How to plot line chart start from 1000 value

3 Answers 109 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Mohsin
Top achievements
Rank 1
Mohsin asked on 18 Jun 2012, 10:44 AM
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

3 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 19 Jun 2012, 12:53 PM
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!
0
Mohsin
Top achievements
Rank 1
answered on 03 Jul 2012, 10:19 AM
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
0
Mohsin
Top achievements
Rank 1
answered on 03 Jul 2012, 11:05 AM
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}" }
        });
Tags
Charts
Asked by
Mohsin
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Mohsin
Top achievements
Rank 1
Share this question
or