Skip to content

Commit

Permalink
Pushing up new docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
grofit committed Sep 7, 2023
1 parent 3fd6e53 commit fc73f89
Show file tree
Hide file tree
Showing 32 changed files with 1,015 additions and 7 deletions.
687 changes: 687 additions & 0 deletions docs/_content/Blazor-ApexCharts/css/apexcharts.css

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions docs/_content/Blazor-ApexCharts/js/apex-charts.min.js

Large diffs are not rendered by default.

302 changes: 302 additions & 0 deletions docs/_content/Blazor-ApexCharts/js/blazor-apex-charts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
window.blazor_apexchart = {

getYAxisLabel(value, index, w) {

if (window.wasmBinaryFile === undefined && window.WebAssembly === undefined) {
console.warn("YAxis labels is only supported in Blazor WASM");
return value;
}

if (w !== undefined) {
return w.config.dotNetObject.invokeMethod('JSGetFormattedYAxisValue', value);
};

if (index !== undefined) {
return index.w.config.dotNetObject.invokeMethod('JSGetFormattedYAxisValue', value);
}

return value;
},

findChart(id) {
if (Apex._chartInstances === undefined) {
return undefined;
}
return ApexCharts.getChartByID(id)

},

destroyChart(id) {
var chart = this.findChart(id);
if (chart !== undefined) {
chart.destroy();
}
},

LogMethodCall(chart, method, data) {
if (chart !== undefined) {
if (chart.opts.debug === true) {
console.log('------');
console.log('Method:' + method);
console.log("Chart Id: " + chart.opts.chart.id)
if (data !== undefined) {
console.log(data);
}
console.log('------');
}
}
},

updateOptions(id, options, redrawPaths, animate, updateSyncedCharts, zoom) {
var data = JSON.parse(options, (key, value) =>
(key === 'formatter' || key === 'dateFormatter' || key === 'custom') && value.length !== 0 ? eval("(" + value + ")") : value
);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, "updateOptions", options);
chart.updateOptions(data, redrawPaths, animate, updateSyncedCharts);

if (zoom !== null) {
chart.zoomX(zoom.start, zoom.end);
}

}
},

appendData(id, data) {
var newData = JSON.parse(data);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, "appendDate", newData);
return chart.appendData(newData);
}
},

toggleDataPointSelection(id, seriesIndex, dataPointIndex) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, "toggleDataPointSelection [" + seriesIndex + '] [' + dataPointIndex + ']');
var pointIndex;
if (dataPointIndex !== null) {
pointIndex = dataPointIndex;
}

return chart.toggleDataPointSelection(seriesIndex, pointIndex);
}
},

zoomX(id, start, end) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'zoomX ' + start + ", " + end);
return chart.zoomX(start, end);
}
},

resetSeries(id, shouldUpdateChart, shouldResetZoom) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'resetSeries ' + shouldUpdateChart + ", " + shouldResetZoom);
return chart.resetSeries(shouldUpdateChart, shouldResetZoom);
}
},

dataUri(id, options) {
var opt = JSON.parse(options);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'dataUri', options);
return chart.dataURI(opt);
}

return '';
},

updateSeries(id, series, animate) {
var data = JSON.parse(series);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'updateSeries', series);
chart.updateSeries(data, animate);
}
},

addPointAnnotation(id, annotation, pushToMemory) {
var data = JSON.parse(annotation);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'addPointAnnotation', annotation);
chart.addPointAnnotation(data, pushToMemory);
}
},

addXaxisAnnotation(id, annotation, pushToMemory) {
var data = JSON.parse(annotation);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'addXaxisAnnotation', annotation);
chart.addXaxisAnnotation(data, pushToMemory);
}
},

addYaxisAnnotation(id, annotation, pushToMemory) {
var data = JSON.parse(annotation);
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'addYaxisAnnotation', annotation);
chart.addYaxisAnnotation(data, pushToMemory);
}
},

clearAnnotations(id) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'clearAnnotations');
chart.clearAnnotations();
}
},

removeAnnotation(chartid, id) {
var chart = this.findChart(chartid);
if (chart !== undefined) {
this.LogMethodCall(chart, 'removeAnnotation', id);
chart.removeAnnotation(id);
}
},

toggleSeries(id, seriesName) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'toggleSeries', seriesName);
chart.toggleSeries(seriesName)
}
},

showSeries(id, seriesName) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'showSeries', seriesName);
chart.showSeries(seriesName)
}
},

hideSeries(id, seriesName) {
var chart = this.findChart(id);
if (chart !== undefined) {
this.LogMethodCall(chart, 'hideSeries', seriesName);
chart.hideSeries(seriesName)
}
},

renderChart(dotNetObject, container, options) {
if (options.debug == true) {
console.log(options);
}

var options = JSON.parse(options, (key, value) =>
(key === 'formatter' || key === 'tooltipHoverFormatter' || key === 'dateFormatter' || key === 'custom') && value.length !== 0 ? eval("(" + value + ")") : value
);

if (options.debug == true) {
console.log(options);
}

options.dotNetObject = dotNetObject;


options.chart.events = {};

if (options.hasDataPointLeave === true) {
options.chart.events.dataPointMouseLeave = function (event, chartContext, config) {
var selection = {
dataPointIndex: config.dataPointIndex,
seriesIndex: config.seriesIndex
}
dotNetObject.invokeMethodAsync('JSDataPointLeave', selection);
}
};

if (options.hasDataPointEnter === true) {
options.chart.events.dataPointMouseEnter = function (event, chartContext, config) {
var selection = {
dataPointIndex: config.dataPointIndex,
seriesIndex: config.seriesIndex
}
dotNetObject.invokeMethodAsync('JSDataPointEnter', selection);
}
};


if (options.hasDataPointSelection === true) {
options.chart.events.dataPointSelection = function (event, chartContext, config) {
var selection = {
dataPointIndex: config.dataPointIndex,
seriesIndex: config.seriesIndex,
selectedDataPoints: config.selectedDataPoints
}
dotNetObject.invokeMethodAsync('JSDataPointSelected', selection);
}
};

if (options.hasMarkerClick === true) {
options.chart.events.markerClick = function (event, chartContext, config) {
var selection = {
dataPointIndex: config.dataPointIndex,
seriesIndex: config.seriesIndex,
selectedDataPoints: config.selectedDataPoints
}
dotNetObject.invokeMethodAsync('JSMarkerClick', selection);
}
};

if (options.hasXAxisLabelClick === true) {
options.chart.events.xAxisLabelClick = function (event, chartContext, config) {
var data = {
labelIndex: config.labelIndex,
caption: event.target.innerHTML
};
dotNetObject.invokeMethodAsync('JSXAxisLabelClick', data);
}
};


if (options.hasLegendClick === true) {
options.chart.events.legendClick = function (chartContext, seriesIndex, config) {
var legendClick = {
seriesIndex: seriesIndex,
collapsed: config.globals.collapsedSeriesIndices.indexOf(seriesIndex) !== -1
}

dotNetObject.invokeMethodAsync('JSLegendClicked', legendClick);
}
};

if (options.hasSelection === true) {
options.chart.events.selection = function (chartContext, config) {
dotNetObject.invokeMethodAsync('JSSelected', config);
};
};

if (options.hasBrushScrolled === true) {
options.chart.events.brushScrolled = function (chartContext, config) {
dotNetObject.invokeMethodAsync('JSBrushScrolled', config);
};
};

if (options.hasZoomed === true) {
options.chart.events.zoomed = function (chartContext, config) {
dotNetObject.invokeMethodAsync('JSZoomed', config);
};
};

//Always destry chart if it exists
this.destroyChart(options.chart.id);

chart = new ApexCharts(container, options);
chart.render();

if (options.debug == true) {
console.log('Chart ' + options.chart.id + ' rendered');
}
}
}
Binary file added docs/_framework/Blazor-ApexCharts.dll
Binary file not shown.
Binary file added docs/_framework/Blazor-ApexCharts.dll.br
Binary file not shown.
Binary file added docs/_framework/Blazor-ApexCharts.dll.gz
Binary file not shown.
Binary file modified docs/_framework/Microsoft.AspNetCore.Components.dll
Binary file not shown.
Binary file modified docs/_framework/Microsoft.AspNetCore.Components.dll.br
Binary file not shown.
Binary file modified docs/_framework/Microsoft.AspNetCore.Components.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.dll
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.dll.br
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.dll.gz
Binary file not shown.
Binary file modified docs/_framework/OpenRpg.Demos.Web.pdb.gz
Binary file not shown.
Binary file modified docs/_framework/System.Linq.dll
Binary file not shown.
Binary file modified docs/_framework/System.Linq.dll.br
Binary file not shown.
Binary file modified docs/_framework/System.Linq.dll.gz
Binary file not shown.
Binary file modified docs/_framework/System.Private.CoreLib.dll
Binary file not shown.
Binary file modified docs/_framework/System.Private.CoreLib.dll.br
Binary file not shown.
Binary file modified docs/_framework/System.Private.CoreLib.dll.gz
Binary file not shown.
Binary file modified docs/_framework/System.Runtime.Serialization.Primitives.dll
Binary file not shown.
Binary file modified docs/_framework/System.Runtime.Serialization.Primitives.dll.br
Binary file not shown.
Binary file modified docs/_framework/System.Runtime.Serialization.Primitives.dll.gz
Binary file not shown.
Binary file modified docs/_framework/System.Runtime.dll
Binary file not shown.
Binary file modified docs/_framework/System.Runtime.dll.br
Binary file not shown.
Binary file modified docs/_framework/System.Runtime.dll.gz
Binary file not shown.
Binary file modified docs/_framework/System.Text.Json.dll
Binary file not shown.
Binary file modified docs/_framework/System.Text.Json.dll.br
Binary file not shown.
Binary file modified docs/_framework/System.Text.Json.dll.gz
Binary file not shown.
15 changes: 8 additions & 7 deletions docs/_framework/blazor.boot.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"linkerEnabled": true,
"resources": {
"assembly": {
"Microsoft.AspNetCore.Components.dll": "sha256-SFvq5WoUPxh40zE6UZ8BRuoYLzfsb3j1JjZskdCdYls=",
"Blazor-ApexCharts.dll": "sha256-PJoSwAELf5jeBRPMM+HUO4V4TOjrtZILtpqPdhDsLEk=",
"Microsoft.AspNetCore.Components.dll": "sha256-KYTCnOKI8FFKJ3rWO0g1Eteyov5BhGkhAEnckIErZFA=",
"Microsoft.AspNetCore.Components.Web.dll": "sha256-msQLM5D8BDrEnSirjwvYM7uiYfGDUxcvFQ2r0eheAeU=",
"Microsoft.AspNetCore.Components.WebAssembly.dll": "sha256-zD6Me\/E7IFgEc8hbtU6Scr\/z5hu3zPTxoy5FcpBOPmU=",
"Microsoft.CSharp.dll": "sha256-FEDRs4miLeZI6Tjv4lnbqnbnxMMAQ5maBH6frLspAyg=",
Expand All @@ -33,7 +34,7 @@
"OpenRpg.Data.dll": "sha256-CJnTB4qe0YdxSXq28e14RoI\/dl0fZEWnEVMiA5lShcA=",
"OpenRpg.Data.InMemory.dll": "sha256-XdmAB1E8NOtcztOLzz2N9INYGnN4LtoAQA2zRVjqPu8=",
"OpenRpg.Demos.Infrastructure.dll": "sha256-\/psbVqucp0c3YlvVZD2I6JM4WqkIt99wmMt\/b37fhEk=",
"OpenRpg.Demos.Web.dll": "sha256-WOCYaVBlz6Y76aX8nA0ZhcJj\/OUS3wBk4vD2CxZ\/hTM=",
"OpenRpg.Demos.Web.dll": "sha256-zG\/pgICmvOOAicgz7EdzAjiPFa4Yn3ghr8K9cJroQrg=",
"OpenRpg.Genres.dll": "sha256-zaXcB\/qqbjaM8V7rRFlG1SKIiyRqczcTwXw1t8+vlKE=",
"OpenRpg.Genres.Fantasy.dll": "sha256-GV90VgAhABFCQzhrvOwp+8c6gSb21XhiscP9denJ9Go=",
"OpenRpg.Items.dll": "sha256-BQypYhjryAmciE1qToVJeVjaglCO2bFjo5ZmSfxnm2A=",
Expand All @@ -52,28 +53,28 @@
"System.dll": "sha256-BNWEPToYca0k2Y0PYNhWWJz+D2hRVoqA4pqCB6I0mxE=",
"System.Drawing.dll": "sha256-BW9w083EkVEAm2xBAvSmRXUnpSd45a3GazhKcjthruU=",
"System.Drawing.Primitives.dll": "sha256-2sqtdptuVCbKPTG50s4QWPCMZzz1r2d5gGy60ieYTmM=",
"System.Linq.dll": "sha256-48slN4vpHOKfJ68D5BY39Gu3IZ\/PMg\/81KpPpV+klhE=",
"System.Linq.dll": "sha256-gsNWPYsCOe8R0z0+VRTpiFDii\/KgdkS7tMbiLKINYYc=",
"System.Linq.Expressions.dll": "sha256-2AWLyEEUmBcfDkWb0BKsmXjqBw5lPOhuAJlMZjMktwY=",
"System.Linq.Queryable.dll": "sha256-cuW5HEWrexvKLiNa74LV1Y7Xb74tT2VEmxzkP9hg5BU=",
"System.Memory.dll": "sha256-f2pwZs1veHufJYGAI2PAQcFZy0VK7DuAEWqkgn39res=",
"System.Net.Http.dll": "sha256-jxHxjv\/UT\/vtG+VcO6R8Qe8HWDUNMaN1W9l0kXuUNTo=",
"System.Net.Primitives.dll": "sha256-+Y4W0aDgbo1USROQ7RoPF965XjIrYKKIxqCDI21DyHQ=",
"System.ObjectModel.dll": "sha256-trq173Zkgqtr52d0Kwb6UcyKnlFjoEOHBkuxxQj\/Oec=",
"System.Private.CoreLib.dll": "sha256-BIJ9sSAKfo4cz+8nD+ZdkgJd3B6bkCvaRReapiuv\/+0=",
"System.Private.CoreLib.dll": "sha256-ME\/mvdmhVNwT0iObB9fTzQHFpXwelyUqUIu3eqdoZcE=",
"System.Private.Runtime.InteropServices.JavaScript.dll": "sha256-oI9StWSp59pw5v0OGUMsXOvfvApHNNSYh5Fu1hhj4aE=",
"System.Private.Uri.dll": "sha256-G4XQ8cPhoEfj9Cm3sklvo3QvHWQ70BzvwXxldoa1avg=",
"System.Private.Xml.dll": "sha256-k1SqvvSeRDudQ1F5417JHY47\/gJmMr2z7RbjWGvZCWY=",
"System.Private.Xml.Linq.dll": "sha256-NDsedCJpFk4gl16V2fpZQo43d8OsrXIhHSEBxLj0mXA=",
"System.Reactive.dll": "sha256-K2wx37H8YBmkKgB+0OXgBXTebqDEf+0MooK\/O7J3Gww=",
"System.Runtime.CompilerServices.Unsafe.dll": "sha256-5IU6GUX8qOctLAYHuQ7clOc3ohNJ6aky7koryZ5i6W8=",
"System.Runtime.dll": "sha256-tmZTNrYmgAAO52mXUvk56u66ZiyJ6otVuPVAlaooXxQ=",
"System.Runtime.dll": "sha256-gq2ClXynYUDznC8rhnmjdM+ui+q6D+Xo83NHWMZ697k=",
"System.Runtime.Numerics.dll": "sha256-wcOhGQspP7B5w8sw85fiDvb5PoqoVglL1w6McQI9aos=",
"System.Runtime.Serialization.Formatters.dll": "sha256-3a5O7rdKGFKGMhKP7IiC55ZB7wu95diy9IQsxjqD4OM=",
"System.Runtime.Serialization.Primitives.dll": "sha256-SdI5LdDlLWcScpQMjrXtZxJycJFs0Y6EbfTEsZymWFc=",
"System.Runtime.Serialization.Primitives.dll": "sha256-O7CUtj3cZNt8zGTY1F67DgAzyBLGyUbOrSs7Fvqm40k=",
"System.Security.Cryptography.Algorithms.dll": "sha256-tiguJnSpmxnxASAqUDyduevAhaLxQOrddRZsBxMpuHw=",
"System.Security.Cryptography.Primitives.dll": "sha256-5M5N6fN9FnOwpw1AAXaOzrmo0lS0mICGu2ic+8gFZ1s=",
"System.Text.Encodings.Web.dll": "sha256-N\/XoDxYCj66R6zT1GyUhKBf0MTVAMZpPKdiYsnN7+zQ=",
"System.Text.Json.dll": "sha256-AZTAR0glsjKMurLL+k1qmlOtaRcpH6QHWbXT1S1ymCo=",
"System.Text.Json.dll": "sha256-vfmZUmZk1EPNYMrFmUp7dWd9OZVZMoUXbVmxitO4XJw=",
"System.Text.RegularExpressions.dll": "sha256-H75d\/yDcGuHf4euDNFu2Rl6xdp+XlbUnRMDxpYxNymU=",
"System.Threading.dll": "sha256-ZYBMO80ZrM5Rncd9EQRmkS\/+PMPg2Z1wItR455oTrm4=",
"System.Threading.Thread.dll": "sha256-WeYlvcGG7Gn1EFeeuTxGCc5LON3xahcSB4gXF1A2QH8=",
Expand Down
Binary file modified docs/_framework/blazor.boot.json.br
Binary file not shown.
Binary file modified docs/_framework/blazor.boot.json.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<script type="application/javascript" src="js/bulma-toast.js"></script>
<script defer src="js/markdown-interop.js"></script>
<script src="_content/Blazor-ApexCharts/js/apex-charts.min.js"></script>
<script src="_content/Blazor-ApexCharts/js/blazor-apex-charts.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
</body>

Expand Down

0 comments on commit fc73f89

Please sign in to comment.