Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F461386
chart.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, May 18, 12:48 AM
Size
1 KB
Mime Type
text/x-ruby
Expires
Tue, May 20, 12:48 AM (1 d, 1 h)
Engine
blob
Format
Raw Data
Handle
220083
Attached To
rARCHIVING archiving
chart.rb
View Options
class
Chart
<
Hash
class
Pie
attr_accessor
:chart_opts
def
initialize
(
series
,
opts
)
@chart_opts
=
{
chart
:
{
plotBackgroundColor
:
nil
,
plotBorderWidth
:
nil
,
plotShadow
:
false
,
type
:
'pie'
},
title
:
{
text
:
opts
[
:title
]
},
tooltip
:
{
pointFormat
:
'{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions
:
{
pie
:
{
allowPointSelect
:
true
,
cursor
:
'pointer'
,
dataLabels
:
{
enabled
:
false
},
showInLegend
:
true
}
},
series
:
[
{
name
:
opts
[
:name
]
,
colorByPoint
:
true
,
data
:
series
}
]
}
end
end
class
ColumnTwoAxis
attr_accessor
:chart_opts
def
initialize
(
series
,
opts
)
@chart_opts
=
{
chart
:
{
type
:
'column'
},
title
:
{
text
:
opts
[
:title
]
},
xAxis
:
{
categories
:
opts
[
:categories
]
,
crosshair
:
true
},
yAxis
:
opts
[
:yaxis
]
,
tooltip
:
{
shared
:
true
},
plotOptions
:
{
column
:
{
pointPadding
:
0
.
2
,
borderWidth
:
0
}
},
series
:
series
}
end
end
end
Event Timeline
Log In to Comment