Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Enable use of candlestick options. #12

Merged
merged 2 commits into from

2 participants

@robertcenima

Benjamin,

Thanks for sharing your plugin. I needed to use additional options to the candlestick chart, so added the possibility to add the option object 'candlestick'.

Hopefully you will pull this into your repository.

Regards,
Robert

@bmuschko bmuschko merged commit 27f3aac into bmuschko:master
@bmuschko bmuschko was assigned
@bmuschko
Owner

Thanks for the contribution. I just released a new version.

@robertcenima
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2013
  1. @robertcenima
  2. @robertcenima
This page is out of date. Refresh to see the latest.
View
4 grails-app/views/index.gsp
@@ -45,6 +45,8 @@
def accumulatedRatingData = [['Alfred Hitchcock (1935)', 8.4, 7.9], ['Ralph Thomas (1959)', 6.9, 6.5], ['Don Sharp (1978)',6.5, 6.4], ['James Hawes (2008)', 4.4, 6.2]]
def lifeExpectancyFertilityRateColumns =[['string', 'ID'], ['number', 'Life Expectancy'], ['number', 'Fertility Rate'], ['string', 'Region'], ['number', 'Population']]
def lifeExpectancyFertilityRateData = [['CAN', 80.66, 1.67, 'North America', 33739900], ['DEU', 79.84, 1.36, 'Europe', 81902307], ['DNK', 78.6, 1.84, 'Europe', 5523095], ['EGY', 72.73, 2.78, 'Middle East', 79716203], ['GBR', 80.05, 2, 'Europe', 61801570], ['IRN', 72.49, 1.7, 'Middle East', 73137148], ['IRQ', 68.09, 4.77, 'Middle East', 31090763], ['ISR', 81.55, 2.96, 'Middle East', 7485600], ['RUS', 68.6, 1.54, 'Europe', 141850000], ['USA', 78.09, 2.05, 'North America', 307007000]]
+ def candlestickOptions = [hollowIsRising: true]
+
%>
<script type="text/javascript">
function selectHandler(e) {
@@ -68,7 +70,7 @@
<gvisualization:imageLineChart elementId="imagelinechart" width="${400}" height="${240}" min="${0}" columns="${companyPerformanceColumns}" data="${companyPerformanceData}" />
<gvisualization:scatterCoreChart elementId="scatterchart" width="${400}" height="${240}" title="Age vs. Weight comparison" hAxis="${new Expando(title: 'Age', minValue: 0, maxValue: 15)}" vAxis="${new Expando(title: 'Weight', minValue: 0, maxValue: 15)}" legend="none" columns="${weightByAgeColumns}" data="${weightByAgeData}" />
<gvisualization:steppedAreaCoreChart elementId="steppedareachart" width="${400}" height="${240}" title="The decline of \'The 39 Steps\'" vAxis="${new Expando(title: 'Accumulated Rating')}" isStacked="${true}" columns="${accumulatedRatingColumns}" data="${accumulatedRatingData}" />
- <gvisualization:candlestickCoreChart elementId="candlestickchart" legend="none" columns="${countByDayColumns}" data="${countByDayData}" />
+ <gvisualization:candlestickCoreChart elementId="candlestickchart" legend="none" columns="${countByDayColumns}" data="${countByDayData}" candlestick="${new Expando(candlestickOptions)}" />
<gvisualization:comboCoreChart elementId="combochart" title="Monthly Coffee Production by Country" vAxis="${new Expando(title: 'Cups')}" hAxis="${new Expando(title: 'Month')}" seriesType="bars" series="${new Expando(5: new Expando(type: 'line'))}" columns="${monthlyCoffeeProdByCountryColumns}" data="${monthlyCoffeeProdByCountryData}" />
<gvisualization:imageSparkLine elementId="imagesparkline" width="${120}" height="${40}" showAxisLines="${false}" showValueLabels="${false}" labelPosition="left" columns="${revenueAndLicensesColumns}" data="${revenueAndLicensesData}" />
<gvisualization:imageCandlestickChart elementId="imagecandlestickchart" columns="${gainersLoserColumns}" data="${gainersLoserData}" />
View
3  ...g/grails/plugins/google/visualization/option/core/CandlestickCoreChartConfigOption.groovy
@@ -44,7 +44,8 @@ enum CandlestickCoreChartConfigOption {
V_AXES("vAxes", [DataType.ARRAY, DataType.OBJECT]),
V_AXIS("vAxis", [DataType.OBJECT]),
WIDTH("width", [DataType.NUMBER, DataType.STRING]),
- FORCEIFRAME("forceIFrame", [DataType.BOOLEAN])
+ FORCEIFRAME("forceIFrame", [DataType.BOOLEAN]),
+ CANDLESTICK("candlestick", [DataType.OBJECT])
static final Map configOptions
Something went wrong with that request. Please try again.