Use constants instead of hardcoded values

This commit is contained in:
Adrien Crivelli 2017-09-09 18:26:01 +09:00
parent e558028eb7
commit ec7312cb64
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
12 changed files with 91 additions and 91 deletions

View File

@ -31,9 +31,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -43,7 +43,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -53,9 +53,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -31,9 +31,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -43,7 +43,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -53,9 +53,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -31,9 +31,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -43,7 +43,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -53,9 +53,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -39,9 +39,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 'Budget' new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 'Budget'
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 'Forecast' new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 'Forecast'
new DataSeriesValues('String', 'Worksheet!$E$1', null, 1), // 'Actual' new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$E$1', null, 1), // 'Actual'
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -51,7 +51,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$B$13', null, 12), // Q1 to Q4 for 2010 to 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$B$13', null, 12), // Q1 to Q4 for 2010 to 2012
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -61,9 +61,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),
new DataSeriesValues('Number', 'Worksheet!$E$2:$E$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$E$2:$E$13', null, 12),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -39,13 +39,13 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels1 = [ $dataSeriesLabels1 = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // Temperature new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // Temperature
]; ];
$dataSeriesLabels2 = [ $dataSeriesLabels2 = [
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // Rainfall new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // Rainfall
]; ];
$dataSeriesLabels3 = [ $dataSeriesLabels3 = [
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // Humidity new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // Humidity
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
@ -56,7 +56,7 @@ $dataSeriesLabels3 = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
@ -67,7 +67,7 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues1 = [ $dataSeriesValues1 = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$13', null, 12),
]; ];
// Build the dataseries // Build the dataseries
@ -91,7 +91,7 @@ $series1->setPlotDirection(DataSeries::DIRECTION_COL);
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues2 = [ $dataSeriesValues2 = [
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),
]; ];
// Build the dataseries // Build the dataseries
@ -112,7 +112,7 @@ $series2 = new DataSeries(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues3 = [ $dataSeriesValues3 = [
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -31,9 +31,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -43,7 +43,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -53,9 +53,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -31,9 +31,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels1 = [ $dataSeriesLabels1 = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -43,7 +43,7 @@ $dataSeriesLabels1 = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues1 = [ $xAxisTickValues1 = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -53,9 +53,9 @@ $xAxisTickValues1 = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues1 = [ $dataSeriesValues1 = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries
@ -103,9 +103,9 @@ $worksheet->addChart($chart1);
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels2 = [ $dataSeriesLabels2 = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -115,7 +115,7 @@ $dataSeriesLabels2 = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues2 = [ $xAxisTickValues2 = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -125,9 +125,9 @@ $xAxisTickValues2 = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues2 = [ $dataSeriesValues2 = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -31,7 +31,7 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels1 = [ $dataSeriesLabels1 = [
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -41,7 +41,7 @@ $dataSeriesLabels1 = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues1 = [ $xAxisTickValues1 = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -51,7 +51,7 @@ $xAxisTickValues1 = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues1 = [ $dataSeriesValues1 = [
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries
@ -103,7 +103,7 @@ $worksheet->addChart($chart1);
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels2 = [ $dataSeriesLabels2 = [
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -113,7 +113,7 @@ $dataSeriesLabels2 = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues2 = [ $xAxisTickValues2 = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -123,7 +123,7 @@ $xAxisTickValues2 = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues2 = [ $dataSeriesValues2 = [
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -39,8 +39,8 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -50,8 +50,8 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec
new DataSeriesValues('String', 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$13', null, 12), // Jan to Dec
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -61,8 +61,8 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$13', null, 12),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', null, 12), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$13', null, 12),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -31,13 +31,13 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -47,9 +47,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -37,10 +37,10 @@ $worksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(NumberFormat::FO
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), //Max / Open new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / Open
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), //Min / Close new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), //Min / Close
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), //Min Threshold / Min new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), //Min Threshold / Min
new DataSeriesValues('String', 'Worksheet!$E$1', null, 1), //Max Threshold / Max new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$E$1', null, 1), //Max Threshold / Max
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -50,7 +50,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$6', null, 5), // Counts new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$6', null, 5), // Counts
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -60,10 +60,10 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$6', null, 5), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$6', null, 5),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$6', null, 5), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$6', null, 5),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$6', null, 5), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$6', null, 5),
new DataSeriesValues('Number', 'Worksheet!$E$2:$E$6', null, 5), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$E$2:$E$6', null, 5),
]; ];
// Build the dataseries // Build the dataseries

View File

@ -28,9 +28,9 @@ $worksheet->fromArray(
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesLabels = [ $dataSeriesLabels = [
new DataSeriesValues('String', 'Worksheet!$B$1', null, 1), // 2010 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010
new DataSeriesValues('String', 'Worksheet!$C$1', null, 1), // 2011 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 2011
new DataSeriesValues('String', 'Worksheet!$D$1', null, 1), // 2012 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012
]; ];
// Set the X-Axis Labels // Set the X-Axis Labels
// Datatype // Datatype
@ -40,7 +40,7 @@ $dataSeriesLabels = [
// Data values // Data values
// Data Marker // Data Marker
$xAxisTickValues = [ $xAxisTickValues = [
new DataSeriesValues('String', 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$A$2:$A$5', null, 4), // Q1 to Q4
]; ];
// Set the Data values for each data series we want to plot // Set the Data values for each data series we want to plot
// Datatype // Datatype
@ -50,9 +50,9 @@ $xAxisTickValues = [
// Data values // Data values
// Data Marker // Data Marker
$dataSeriesValues = [ $dataSeriesValues = [
new DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$B$2:$B$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$C$2:$C$5', null, 4),
new DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', null, 4), new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_NUMBER, 'Worksheet!$D$2:$D$5', null, 4),
]; ];
// Build the dataseries // Build the dataseries