[ckan-dev] Recline.JS problems

Daniel Lombraña González teleyinex at gmail.com
Tue Jul 24 11:15:38 UTC 2012


I think I found the solution :-) timeline.render does not work, so if you
remove it from the code it renders the Timeline :-D

On Tue, Jul 24, 2012 at 12:49 PM, Daniel Lombraña González <
teleyinex at gmail.com> wrote:

>
>
> On Tue, Jul 24, 2012 at 12:18 PM, Rufus Pollock <rufus.pollock at okfn.org>wrote:
>
>> On 24 July 2012 11:07, Daniel Lombraña González <teleyinex at gmail.com>
>> wrote:
>> > Dear all,
>> >
>> > I'm trying to use Recline.JS for displaying some data and learning
>> something
>> > new, but when I'm following the tutorial I've found some issues:
>> >
>> > * Creating the dataset with the following code gives some errors:
>> >
>> >
>> > var dataset = new recline.Model.Dataset({
>> >   records: data
>> > });
>> >
>> >
>> > So I've tried with this other approach from the source code:
>> >
>> >                     var fields = [
>> >                         {id: 'id'},
>> >                         {id: 'user_name'},
>> >                         {id: 'date', type:'date'}
>> >                         ];
>> >
>> >                     var dataset =
>> > recline.Backend.Memory.createDataset(data,fields);
>> >
>> > This one works. After that, I continued with the tutorial, and I found
>> that:
>> >
>> > * dataset.recordCount returns undefined and I do not know why.
>> > * the same for dataset.records.length, however if you try
>> > dataset.attributes.records it works
>>
>> Have you called dataset.fetch();
>>
>
> I've tried right now, and it does not make any difference :-(  I should be
> doing something wrong.
>
>
>> > I've tried it with my own code and dataset, and with the examples that
>> are
>> > provided in the Github repository, but in all the cases I get the same
>> > "undefined" output. Interestingly, the Grid view works and renders well
>> > (actually, the first row does not show the right colors, but that's
>> > something about the CSS and I'm not too worried right now).
>> >
>> > Then, after rendering the Grid, I wanted to try with the Timeline. I
>> > followed the same approach as with the Grid:
>> >
>> >                     var timeline = new recline.View.Timeline({
>> >                         model: dataset,
>> >                         el: $el
>> >                             });
>> >                     grid.visible = true;
>> >                     grid.render();
>> >
>> >
>> > where $el is a div in the HTML page, and the dataset has the following
>> > fields:
>> >
>> > [{id, user_name, date}]
>> >
>> > While the Grid works well, the Timeline does not show anything, and I
>> do not
>> > get any console error, so I do not know where is the problem. Can you
>> help
>> > me and let me know what I'm doing wrong? Thanks in advance!!!
>>
>> Can you post your full code somewhere?
>>
>
>
> http://paste.ubuntu.com/1107973/
>
> Thanks in advance!!!
>
> Daniel
>
>>
>> Rufus
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>
>
>
>
> --
>
> ··························································································································································
> http://github.com/teleyinex
> http://www.flickr.com/photos/teleyinex
>
> ··························································································································································
> Por favor, NO utilice formatos de archivo propietarios para el
> intercambio de documentos, como DOC y XLS, sino PDF, HTML, RTF, TXT, CSV
> o cualquier otro que no obligue a utilizar un programa de un
> fabricante concreto para tratar la información contenida en él.
>
> ··························································································································································
>



-- 
··························································································································································
http://github.com/teleyinex
http://www.flickr.com/photos/teleyinex
··························································································································································
Por favor, NO utilice formatos de archivo propietarios para el
intercambio de documentos, como DOC y XLS, sino PDF, HTML, RTF, TXT, CSV
o cualquier otro que no obligue a utilizar un programa de un
fabricante concreto para tratar la información contenida en él.
··························································································································································
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120724/ce5b4770/attachment-0001.html>


More information about the ckan-dev mailing list