With some options:
+
+
With some options:
-
-
+
+
diff --git a/docs/articles/labs_files/apexcharter-binding-0.0.4.910/apexcharter.js b/docs/articles/labs_files/apexcharter-binding-0.0.4.910/apexcharter.js
new file mode 100644
index 0000000..988d069
--- /dev/null
+++ b/docs/articles/labs_files/apexcharter-binding-0.0.4.910/apexcharter.js
@@ -0,0 +1,93 @@
+HTMLWidgets.widget({
+
+ name: 'apexcharter',
+
+ type: 'output',
+
+ factory: function(el, width, height) {
+
+ var ax_opts;
+ var apexchart = null;
+
+ return {
+
+ renderValue: function(x) {
+
+
+ // Global options
+ ax_opts = x.ax_opts;
+
+ // Sizing
+ if (typeof ax_opts.chart === 'undefined') {
+ ax_opts.chart = {};
+ }
+ ax_opts.chart.width = width;
+ ax_opts.chart.height = height;
+
+ // Generate or update chart
+ if (apexchart === null) {
+ apexchart = new ApexCharts(document.querySelector("#" + el.id), ax_opts);
+ apexchart.render();
+ } else {
+ if (x.auto_update) {
+ apexchart.updateSeries(ax_opts.series);
+ } else {
+ apexchart.destroy();
+ apexchart = new ApexCharts(document.querySelector("#" + el.id), ax_opts);
+ apexchart.render();
+ }
+ }
+
+
+ },
+
+ getChart: function(){
+ return apexchart;
+ },
+
+ resize: function(width, height) {
+ apexchart.updateOptions({
+ chart: {
+ width: width,
+ height: height
+ }
+ });
+ }
+
+ };
+ }
+});
+
+// From Friss tuto (https://github.com/FrissAnalytics/shinyJsTutorials/blob/master/tutorials/tutorial_03.Rmd)
+function get_widget(id){
+
+ // Get the HTMLWidgets object
+ var htmlWidgetsObj = HTMLWidgets.find("#" + id);
+
+ // Use the getChart method we created to get the underlying billboard chart
+ var widgetObj ;
+
+ if (typeof htmlWidgetsObj != 'undefined') {
+ widgetObj = htmlWidgetsObj.getChart();
+ }
+
+ return(widgetObj);
+}
+
+
+
+if (HTMLWidgets.shinyMode) {
+ // data = load
+ Shiny.addCustomMessageHandler('update-apexchart-series',
+ function(obj) {
+ var chart = get_widget(obj.id);
+ if (typeof chart != 'undefined') {
+ chart.updateSeries(obj.data.newSeries, obj.data.animate);
+ }
+ });
+}
+
+
+
+
+
diff --git a/docs/articles/labs_files/apexcharts-3.6.10/apexcharts.js b/docs/articles/labs_files/apexcharts-3.6.10/apexcharts.js
deleted file mode 100644
index 7217001..0000000
--- a/docs/articles/labs_files/apexcharts-3.6.10/apexcharts.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * ApexCharts v3.6.10
- * (c) 2018-2019 Juned Chhipa
- * Released under the MIT License.
- */
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ApexCharts=e()}(this,function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i