This question is locked. New answers and comments are not allowed.
I have attached an image of a bar chart I am currently generated (with my code at the bottom of this post).
Two Questions:
(1) Can I have just one of the chart series labels show up?
In my uploaded picture example, could the OCT "$222.14" show up while the rest are hidden from view?
They may have meant for the first month's amount to display (the MAR "$523.12), so hopefully the solution is flexible enough.
(2) There seems to be some kind of padding on the right of the chart that is inconsistent with the padding on the left of the chart.
See uploaded image.
Is there any remedy for this?
Thanks,
Randy
Here is my existing code that you can use
HTML
.JS
Two Questions:
(1) Can I have just one of the chart series labels show up?
In my uploaded picture example, could the OCT "$222.14" show up while the rest are hidden from view?
They may have meant for the first month's amount to display (the MAR "$523.12), so hopefully the solution is flexible enough.
(2) There seems to be some kind of padding on the right of the chart that is inconsistent with the padding on the left of the chart.
See uploaded image.
Is there any remedy for this?
Thanks,
Randy
Here is my existing code that you can use
HTML
<div id="chartStatementHistory" style="width: 450px; height:150px;" data-win-control="Telerik.UI.RadChart"></div>.JS
// Build The RadChartvar chartData = new WinJS.Binding.List([ { date: new Date(2013, 2, 1), amount: 523.12 }, { date: new Date(2013, 1, 1), amount: 448.94 }, { date: new Date(2012, 12, 1), amount: 259.49 }, { date: new Date(2012, 11, 1), amount: 455.89 }, { date: new Date(2012, 10, 1), amount: 118.21 }, { date: new Date(2012, 9, 1), amount: 222.14 }]);//order by date descending chartData.sort(function (a, b){ return b.date - a.date;});// Represent dates as strings (month names only)chartData.forEach(function (item){ item.date = item.date.toString().split(" ")[1]});var chart = new Telerik.UI.RadChart(document.getElementById("chartStatementHistory"), { dataSource: chartData, series: [ { type: "column", field: "amount", color: "#9C3987", labels: { visible: true, format: "${0}", font: "11pt customsans normal", color: "#000000", weight: "normal" } } ], categoryAxis: { field: "date", color: "#000000", labels: { font: "11pt customsans normal", color: "#000000" }, majorTicks: { size: 0, visable: false }, minorTicks: { size: 0, visable: false } }, valueAxis: { field: "amount", color: "#9C3987", labels: { font: "11pt customsans normal", color: "#000000", format: "${0}" }, majorGridLines: { color: "#FFFFFF", width: 0, visable: false }, minorGridLines: { color: "#FFFFFF", width: 0, visable: false }, visible: false }, tooltip: { visible: false, labels: { font: "11pt customsans normal", format: "${0}" } }, plotArea: { border: { width: 1, color: "#000000" } }, theme: "light", background: "#FFFFFF"});