HI,
I was wundering. I'm using a donut chart from Kendo UI. Wich works fine. However i want to rotate the legend. Is this possible ? and how can i do it ? everything i trie doesn't seem to work. anyone got some idea?? thnx
Code:
- <script type="text/javascript">
- $(document).ready(function () {
-
- var collectors = [{
- "source": "Failed",
- "ammount": @Model.CollectorStatus.Count(c => !c.BatchCompleted.Value),
- }, {
- "source": "Completed",
- "ammount": @Model.CollectorStatus.Count(c => c.BatchCompleted.Value),
- }];
-
- $("#collectorstatistics").kendoChart({
- title: {
- position: "top",
- text: "Collectors",
- },
- legend: {
- position: "bottom",
-
-
-
-
- },
- dataSource: {
- data: collectors
- },
- series: [{
- type: "donut",
- field: "ammount",
- categoryField: "source"
- // rotation: 90 // doesn't work asswell
- }],
- chartArea: {
- background: "none",
- },
- tooltip: {
- visible: true,
- template: "${ category } - ${ value } Collectors"
- }
- });
Never Mind.
I got it working, but it looks really crap, so i deleted it again.
Here is my code for if someone wants to use it.
Code:
- <script type="text/javascript">
- $(document).ready(function () {
-
- var collectors = [{
- "source": "Failed",
- "ammount": @Model.CollectorStatus.Count(c => !c.BatchCompleted.Value),
- }, {
- "source": "Completed",
- "ammount": @Model.CollectorStatus.Count(c => c.BatchCompleted.Value),
- }];
-
- $("#collectorstatistics").kendoChart({
- title: {
- position: "top",
- text: "Collectors",
- },
- legend: {
- position: "bottom",
-
-
-
-
- },
- dataSource: {
- data: collectors
- },
- series: [{
- type: "donut",
- field: "ammount",
- categoryField: "source"
- }],
- chartArea: {
- background: "none",
- },
- tooltip: {
- visible: true,
- template: "${ category } - ${ value } Collectors"
- }
- });