| @@ -244,8 +244,10 @@ | ||
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | $library = $this->load_chart_type( $chart->ID ); |
| 247 | 247 | |
| 248 | + $id = $id . '-' . rand(); | |
| 249 | + | |
| 248 | 250 | // add chart to the array |
| 249 | 251 | $this->_charts[ $id ] = array( |
| 250 | 252 | 'type' => $type, |
| 251 | 253 | 'series' => $series, |
| @@ -292,9 +294,9 @@ | ||
| 292 | 294 | $key = $array[0]; |
| 293 | 295 | $mime = end( $array ); |
| 294 | 296 | } |
| 295 | 297 | $label = $actions[ $key ]; |
| 296 | - $actions_div .= '<a href="#" class="visualizer-action visualizer-action-' . $key . '" data-visualizer-type="' . $key . '" data-visualizer-chart-id="' . $atts['id'] . '" data-visualizer-mime="' . $mime . '" title="' . $label . '" '; | |
| 298 | + $actions_div .= '<a href="#" class="visualizer-action visualizer-action-' . $key . '" data-visualizer-type="' . $key . '" data-visualizer-chart-id="' . $atts['id'] . '" data-visualizer-container-id="' . $id . '" data-visualizer-mime="' . $mime . '" title="' . $label . '" '; | |
| 297 | 299 | |
| 298 | 300 | if ( 'copy' === $key ) { |
| 299 | 301 | $copy = $this->_getDataAs( $atts['id'], 'csv' ); |
| 300 | 302 | $actions_div .= ' data-clipboard-text="' . esc_attr( $copy['csv'] ) . '"'; |