Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble creating a 10 row table.. #58

Open
dynalabs opened this issue Jul 3, 2014 · 1 comment
Open

trouble creating a 10 row table.. #58

dynalabs opened this issue Jul 3, 2014 · 1 comment
Labels

Comments

@dynalabs
Copy link

dynalabs commented Jul 3, 2014

I am having trouble with applying "Max results" or any other filter/query to work on an oocharts table:

<div data-oochart='table' data-oochart-start-date='30d' data-oochart-metrics='ga:adClicks,Clicks,ga:avgTimeOnSite,Avg. Time on Site (seconds)' data-oochart-dimensions='ga:keyword,Keyword' data-oochart-profile='MY PROFILE ID'></div>


    <script type="text/javascript">

        window.onload = function(){

            oo.setAPIKey("MY API KEY");

            oo.load(function(){

                var table = new oo.Table("MY PROFILE ID}{literal}", "30d");

                table.addMetric("ga:adClicks", "Clicks");
                table.addMetric("ga:avgTimeOnSite", "Avg. Time on Site (seconds)");
                table.addDimension("ga:keyword", "Keyword");
                table.query.setMaxResults(10);

                table.draw('table');

            });
        };

    </script>

I've used table.query.setMaxResults(10); to try and get only 10 results but it doesn't work (table shows with all results.) I've tried using '10'. I've also tried using:

oo.setTableDefaults({
page:'enable',
pageSize: '15',
sort: 'enable',
sortAscending: false,
sortColumn: 1,
allowHtml: true,
});

to create pages of 10, but only the first page shows 10 rows, all the rest show random amounts of rows.

I've also tried using the ooCharts setFilter() query and it doesn't work.

Help would be very much appreciated.

Thank you.

@tshaddix tshaddix added the bug label Jul 8, 2014
@tshaddix
Copy link
Owner

tshaddix commented Jul 8, 2014

@dynalabs this should definitely work. I'm labeling this as a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants