chart-candy 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58dc504791575eb30195f72a66090fd70d38dccb
4
- data.tar.gz: 7dfbbfcc7c1b2be6d4d366a4ebbe8624b9c5cb97
3
+ metadata.gz: eadbff1827c425952eea251f73d65499e0668e6f
4
+ data.tar.gz: e53b8056ee72f26473cb8e9002cf94eedebc7abd
5
5
  SHA512:
6
- metadata.gz: eae903caf21595e331c2cee41e3bdafdc270d421a82197cfbde1672ab13ba1dab5d8da556958121439dc92ca8c0c71eccb537709b701e40a8608d7b961144cc6
7
- data.tar.gz: eb5fc74a703a6d56b7acb50e5c1d077283b1dd519ba6152d651c4255a25c27a014ad8d0ebab1399332265feb77a55b294da6b44f7216e17ebc2ccd2ecba16823
6
+ metadata.gz: 46f7ce1b8c79c9ec3b983583fc5dd14f7544044a3a77254b61f0a3abdb99bc819bab92708460fbf75916fb9f273b3fce71063bf9295317c45f4044c0a7a1eeb7
7
+ data.tar.gz: e475cbd99c73bdc5663ec618323e26726e6ebb608800b185690b558c32b80d60f1a23c962a8d748fa1db54eaef0cc3b6a652e5a37a4287f1f12353d51007f0b4
@@ -8,6 +8,10 @@ class ChartCandy::Builder::Base
8
8
  @chart = { id: id }
9
9
  @chart[:step] = options[:step] if options[:step]
10
10
  @chart[:title] = t('title')
11
+
12
+ # Subtitles are likely to be dynamic and thus cannot be defined in translation files.
13
+ @chart[:subtitle] = options[:subtitle].presence
14
+
11
15
  @chart[:period] = ChartCandy::Builder.period(@from, @to, step: @chart[:step]) if @from
12
16
  end
13
17
 
@@ -118,6 +118,7 @@ class ChartCandy::Builder::XlsBuilder
118
118
 
119
119
  def header
120
120
  row @chart[:title], :h1
121
+ row @chart[:subtitle], :h2 if @chart[:subtitle]
121
122
  row @chart[:period], :h3 if @chart[:period]
122
123
 
123
124
  reset_columns_width
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chart-candy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Rosa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-17 00:00:00.000000000 Z
11
+ date: 2018-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spreadsheet
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  requirements: []
133
133
  rubyforge_project: chart-candy
134
- rubygems_version: 2.4.5.1
134
+ rubygems_version: 2.4.5
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Chart Candy use D3.js library to quickly render AJAX charts in your Rails