i'm facing same problem i can't able to pagination inside my chart i'm using jqchart suggest me with my code what i implement to my code..
<div id="vks">
<tr>
<td>
@{
var data = (List<ServiceMVC4RIA.Animatedmodel.CollectionDateWise>)TempData["list"];
var mySubAL = data.GetRange(0, 5);
//foreach (var value in data)
// {
// Console.WriteLine(value);
// }
//IEnumerable<ServiceMVC4RIA.Animatedmodel.CollectionDateWise> aa = c.Take(5).ToList();
}
@(Html.JQChart()
.Chart(mySubAL)
.ID("jqChart")
.Width(500)
.Height(500)
.Title("Column Chart Colors")
.Animation(TimeSpan.FromSeconds(2))
.Shadows(true)
.Series(series =>
{
series.Column()
.Title("Series 1")
.XValues(el => el.InvoiceDate)
.YValues(el => el.AmountReceived)
.FillStyles(new object[] { "#418CF0", "#FCB441", "#E0400A", "#056492", "#BFBFBF", "#1A3B69", "#FFE382" });
}
)
.Render()
)
</td>
</tr>
</div>
<div id="jqChart" style="width: 500px; height: 300px;"> <br />
<input id="buttonAddPoint" type="button" value="Add new point" />
<input id="buttonRemovePoint" type="button" value="Remove last point" />
<br />
</div>
</body>
</html>
<script type="text/javascript">
// $('.jqplot-xaxis-tick').each(function () {
// alert("WHAT IS THIS");
// var label = $(this),
// value = label.text();
// if (categorylinks[value]) {
// label.click(function () {
// alert('could link to another page: ' + categorylinks[value]);
// });
// }
// });
function getRandomData() {
var data = [];
for (var i = 0; i < 20; i++) {
data.push([i, Math.round(Math.random() * 100)]);
}
return data;
}
$('#buttonAddPoint').click(function () {
alert("add data");
// get current series
var series = $('#jqChart').jqChart('option', 'series');
var newSeries = {
data: getRandomData()
};
series.push(newSeries);
alert("add data1");
// get the data from the first series
//var data = series[0].data;
// add new data item
//data.push(Math.round(Math.random() * 100));
// update (redraw) the chart
$('#jqChart').jqChart('update');
});
$('#buttonRemovePoint').click(function () {
// get current series
var series = $('#jqChart').jqChart('option', 'series');
// get the data from the first series
var data = series[0].data;
// remove the last data item
data.splice(data.length - 1, 1);
// update (redraw) the chart
$('#jqChart').jqChart('update');
});