Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1615111
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
Sat, Mar 21, 6:36 PM
Size
1 KB
Mime Type
text/x-ruby
Expires
Mon, Mar 23, 6:36 PM (1 d, 4 h)
Engine
blob
Format
Raw Data
Handle
351687
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