Hi all,
I'm actually kendo-beginner and my question is: is it possible to convert html table into column chart?
I have something similier to this but it is not working, i have a feeling that this might be related to databinding process but I'm not sure..
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="RefData">
<HeaderTemplate>
<table id="datatable">
<thead>
<tr>
<th > Name </th>
<th>Score</th>
</tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tbody>
<tr>
<td >
<%# DataBinder.Eval(Container.DataItem, "QName") %>
</td>
<td >
<%# DataBinder.Eval(Container.DataItem, "Score") %>
</td>
</tr>
</tbody>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<script type="text/javascript">
var dataTest = [document.getElementById('datatable')];
function createChart() {
$("#chart").kendoChart({
dataSource: {
data: dataTest
},
title: {
align: "center",
text: "Score"
},
legend: {
visible: false
},
seriesDefaults: {
type: "column",
labels: {
visible: true,
background: "transparent"
}
},
series: [{
field: "Score",
colorField: "userColor"
}],
valueAxis: {
max: 28,
majorGridLines: {
visible: false
},
visible: false
},
categoryAxis: {
field: "Score",
majorGridLines: {
visible: false
},
line: {
visible: false
}
}
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
</div>
Any help is appreciated.
Regards,
Maryam
I'm actually kendo-beginner and my question is: is it possible to convert html table into column chart?
I have something similier to this but it is not working, i have a feeling that this might be related to databinding process but I'm not sure..
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="RefData">
<HeaderTemplate>
<table id="datatable">
<thead>
<tr>
<th > Name </th>
<th>Score</th>
</tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tbody>
<tr>
<td >
<%# DataBinder.Eval(Container.DataItem, "QName") %>
</td>
<td >
<%# DataBinder.Eval(Container.DataItem, "Score") %>
</td>
</tr>
</tbody>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<script type="text/javascript">
var dataTest = [document.getElementById('datatable')];
function createChart() {
$("#chart").kendoChart({
dataSource: {
data: dataTest
},
title: {
align: "center",
text: "Score"
},
legend: {
visible: false
},
seriesDefaults: {
type: "column",
labels: {
visible: true,
background: "transparent"
}
},
series: [{
field: "Score",
colorField: "userColor"
}],
valueAxis: {
max: 28,
majorGridLines: {
visible: false
},
visible: false
},
categoryAxis: {
field: "Score",
majorGridLines: {
visible: false
},
line: {
visible: false
}
}
});
}
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
</div>
Any help is appreciated.
Regards,
Maryam