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

Problem binding chart dataSource in template

0 Answers 102 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 20 Sep 2012, 09:26 PM
I'm trying to bind a chart using MVVM, but get this error:  "Uncaught Error: The dataSource binding is not supported by the Chart widget"

Here is my template:
    <script id="chart-template" type="script/x-kendo-template">
        <div data-role="chart" data-series-field="value" data-categoryaxis-field="category" data-seriesdefaults-type="column" data-bind="dataSource: #: parent().parent().dataSource #" class="chart"></div>
    </script>

I'm using parent to get back to the chart array's main object, since it has the datasource.  If it would have worked, I would have switched that to a function that would return a new datasource specific to each chart.  Is my template totally wrong, or can you really just not bind a chart's dataSource with templates yet?  I'm a Kendo newbie, so I could easily be messing this up.  Thanks!

Edit:  
Ok, so now I got this when trying to declaratively bind the tabstrip's activate event: "Error: The activate binding is not supported by the TabStrip widget".  This whole declarative initialization really seems half-baked.  Can someone please comment on this?  If this is the case, can you at least indicate in the documentation whether each property/event can be declaratively databound?


No answers yet. Maybe you can help?

Tags
Charts
Asked by
Michael
Top achievements
Rank 1
Share this question
or