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

Shared DataSource Grid-Chart

2 Answers 138 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Ioan
Top achievements
Rank 1
Ioan asked on 26 Feb 2015, 11:45 AM
Hi!
On my mobile app, I'm using pairs of Charts and Grids with Shared DataSource. In one case I have a lot of records, and I wish to make the Grid pageable. I did that, i also set pageSize for DataSource, but the problem is the Chart is now pageable too. (There's no server paging, all the data is retrieved at once). On the Chart I want to see all the records represented and not by page. 


this.ds = new kendo.data.DataSource({
           transport: {
                read: {
                    url: this.url,
                    dataType: "json"
                }
            },
            pageSize: 10
        });

        this.ds.read();

        $("#chartDmaAMinNghtFlw").kendoChart({
            autoBind: false,
            dataSource: this.ds,
            series: [
                {
                    name: "AAA",
                    type: "line",
                    field: "AAA",
                }
            ],
            categoryAxis: {
                field: "BBB"
            }
        });

        $("#gridDmaAMinNghtFlw").kendoGrid({
            autoBind: false,
            dataSource: this.ds,
            scrollable: false,
            sortable: false,
            filterable: false,
            pageable: {
                pageSize: 10,
                pageSizes: [10,20,30,40,50,365]
            },
            columns: [
                { field: "AAA", title: "AAA"},
                { field: "BBB", title: "BBB"}
            ]
        });

2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 02 Mar 2015, 11:34 AM
Hello Ioan,

In that case you might try using a Grid with virtual scrolling instead of paging.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ioan
Top achievements
Rank 1
answered on 06 Mar 2015, 08:28 AM
I used two DataSources, and the data I set it manually from a getJSON request. 
I'll try the virtualpaging too, but it will probably not work very well because the view is also vertical scrollable. And if the grid is also vertical scrollable it might get hard to go through the page.
Tags
Charts
Asked by
Ioan
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Ioan
Top achievements
Rank 1
Share this question
or