Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F324256
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, Nov 24, 5:55 PM
Size
1 KB
Mime Type
text/x-ruby
Expires
Tue, Nov 26, 5:55 PM (1 d, 3 h)
Engine
blob
Format
Raw Data
Handle
156069
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