TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cassie Mod
NA
488
70.4k
rotation legend donut chart not working
Feb 9 2016 5:01 AM
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"
,
// this text should be rotated 90 degreees
"ammount"
: @Model.CollectorStatus.Count(c => !c.BatchCompleted.Value),
}, {
"source"
:
"Completed"
,
// this text should be rotated 90 degrees
"ammount"
: @Model.CollectorStatus.Count(c => c.BatchCompleted.Value),
}];
$(
"#collectorstatistics"
).kendoChart({
title: {
position:
"top"
,
text:
"Collectors"
,
},
legend: {
position:
"bottom"
,
// orientation: "vertical" // doesn't work
// rotation: 90 // doesn't work
// rotation: -90 or -45 or 45 // doesn't work
//labels : { rotation: 90} // doesn't work
},
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"
,
// this doesn't look nice so i removed it again
//labels:{
// rotation: 90
//}
},
dataSource: {
data: collectors
},
series: [{
type:
"donut"
,
field:
"ammount"
,
categoryField:
"source"
}],
chartArea: {
background:
"none"
,
},
tooltip: {
visible:
true
,
template
:
"${ category } - ${ value } Collectors"
}
});
Reply
Answers (
1
)
MOdel PopUp in javascript
JMeter step by step tutorial?