| @@ -394,8 +394,21 @@ | ||
| 394 | 394 | if ( isset( $settings['chart-img'] ) ) { |
| 395 | 395 | unset( $settings['chart-img'] ); |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | + $enable_controls = false; | |
| 399 | + if ( isset( $settings['controls'] ) && ! empty( $settings['controls']['controlType'] ) ) { | |
| 400 | + $column_index = $settings['controls']['filterColumnIndex']; | |
| 401 | + $column_label = $settings['controls']['filterColumnLabel']; | |
| 402 | + if ( 'false' !== $column_index || 'false' !== $column_label ) { | |
| 403 | + $enable_controls = true; | |
| 404 | + } | |
| 405 | + } | |
| 406 | + | |
| 407 | + if ( ! $enable_controls ) { | |
| 408 | + unset( $settings['controls'] ); | |
| 409 | + } | |
| 410 | + | |
| 398 | 411 | // add chart to the array |
| 399 | 412 | $this->_charts[ $id ] = array( |
| 400 | 413 | 'type' => $type, |
| 401 | 414 | 'series' => $series, |
| @@ -477,10 +490,13 @@ | ||
| 477 | 490 | $prefix = 'C' . 'h' . 'a' . 'rt'; |
| 478 | 491 | if ( $type === 'tabular' ) { |
| 479 | 492 | $prefix = 'T' . 'a' . 'bl' . 'e'; |
| 480 | 493 | } |
| 494 | + if ( Visualizer_Module::is_pro() && $enable_controls ) { | |
| 495 | + $actions_div .= '<div id="control_wrapper_' . $id . '"></div>'; | |
| 496 | + } | |
| 481 | 497 | // return placeholder div |
| 482 | - return '<div class="' . $container_class . '">' . $actions_div . '<div id="' . $id . '"' . $this->getHtmlAttributes( $attributes ) . '></div>' . $this->addSchema( $chart->ID ) . ( ! Visualizer_Module::is_pro() ? ( '<' . 'di' . 'v st' . 'yl' . 'e="' . 'op' . 'a' . 'ci' . 't' . 'y:' . '0' . '.7' . ';t' . 'ex' . 't-a' . 'li' . 'gn:' . 'ri' . 'gh' . 't;b' . 'o' . 'tto' . 'm: 1' . '0px; z-i' . 'nd' . 'ex:1' . '00' . '0; ' . 'le' . 'ft' . ':2' . '0px' . '; fo' . 'nt-si' . 'ze: 1' . '4px">' . $prefix . ' b' . 'y' . ' <a ' . 'h' . 're' . 'f="ht' . 'tp' . 's:/' . '/t' . 'he' . 'me' . 'i' . 'sl' . 'e' . '.c' . 'om' . '/p' . 'lu' . 'gi' . 'ns' . '/v' . 'i' . 'su' . 'al' . 'iz' . 'er' . '-c' . 'ha' . 'rts' . '-a' . 'nd' . '-gr' . 'ap' . 'hs' . '/" t' . 'arg' . 'et="' . '_bl' . 'an' . 'k" re' . 'l=' . '"no' . 'fol' . 'l' . 'ow"' . '>V' . 'is' . 'u' . 'a' . 'l' . 'i' . 'z' . 'e' . 'r' . '</' . 'a' . '>' . '<' . '/' . 'd' . 'i' . 'v' . '>' ) : '' ) . '</div>'; | |
| 498 | + return '<div class="' . $container_class . '" id="chart_wrapper_' . $id . '">' . $actions_div . '<div id="' . $id . '"' . $this->getHtmlAttributes( $attributes ) . '></div>' . $this->addSchema( $chart->ID ) . ( ! Visualizer_Module::is_pro() ? ( '<' . 'di' . 'v st' . 'yl' . 'e="' . 'op' . 'a' . 'ci' . 't' . 'y:' . '0' . '.7' . ';t' . 'ex' . 't-a' . 'li' . 'gn:' . 'ri' . 'gh' . 't;b' . 'o' . 'tto' . 'm: 1' . '0px; z-i' . 'nd' . 'ex:1' . '00' . '0; ' . 'le' . 'ft' . ':2' . '0px' . '; fo' . 'nt-si' . 'ze: 1' . '4px">' . $prefix . ' b' . 'y' . ' <a ' . 'h' . 're' . 'f="ht' . 'tp' . 's:/' . '/t' . 'he' . 'me' . 'i' . 'sl' . 'e' . '.c' . 'om' . '/p' . 'lu' . 'gi' . 'ns' . '/v' . 'i' . 'su' . 'al' . 'iz' . 'er' . '-c' . 'ha' . 'rts' . '-a' . 'nd' . '-gr' . 'ap' . 'hs' . '/" t' . 'arg' . 'et="' . '_bl' . 'an' . 'k" re' . 'l=' . '"no' . 'fol' . 'l' . 'ow"' . '>V' . 'is' . 'u' . 'a' . 'l' . 'i' . 'z' . 'e' . 'r' . '</' . 'a' . '>' . '<' . '/' . 'd' . 'i' . 'v' . '>' ) : '' ) . '</div>'; | |
| 483 | 499 | } |
| 484 | 500 | |
| 485 | 501 | /** |
| 486 | 502 | * Converts the array of attributes to a string of HTML attributes. |