Skip to content
Snippets Groups Projects
Commit 25b62829 authored by Daniel Cothran's avatar Daniel Cothran
Browse files

Add Donut chart type in config form and small changes brushing up for DrupalGovCon2017 sprint.

parent beb0169b
No related branches found
No related tags found
No related merge requests found
vendor/
composer.lock
\ No newline at end of file
......@@ -30,7 +30,7 @@ class C3ChartsRender implements ChartsRenderInterface {
$noAttachmentDisplays = count($attachmentDisplayOptions) === 0;
$yAxis = [];
$types = [];
//sets secondary axis from the first attachment only
// Sets secondary axis from the first attachment only.
if (!$noAttachmentDisplays && $attachmentDisplayOptions[0]['inherit_yaxis'] == 0) {
$yAxis[$seriesData[1]['name']] = 'y2';
}
......
vendor/
composer.lock
\ No newline at end of file
......@@ -59,6 +59,7 @@ class GoogleChartsRender implements ChartsRenderInterface {
* @return GoogleOptions object with chart options or settings to be used by google visualization framework
*/
private function charts_google_create_charts_options($options, $seriesData = [], $attachmentDisplayOptions = []) {
$noAttachmentDisplays = count($attachmentDisplayOptions) === 0;
$chartSelected = [];
$seriesTypes = [];
$firstVaxis = ['minValue' => 0, 'title' => $options['yaxis_title']];
......@@ -66,7 +67,7 @@ class GoogleChartsRender implements ChartsRenderInterface {
$vAxes = [];
array_push($vAxes, $firstVaxis);
//sets secondary axis from the first attachment only
if ($attachmentDisplayOptions[0]['inherit_yaxis'] == 0) {
if (!$noAttachmentDisplays && $attachmentDisplayOptions[0]['inherit_yaxis'] == 0) {
$secondVaxis['title'] = $attachmentDisplayOptions[0]['style']['options']['yaxis_title'];
array_push($vAxes, $secondVaxis);
}
......
vendor/
composer.lock
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment