Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a few charting libraries #205

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ The Library Detector extension discovers which JavaScript libraries are being
utilized on webpages that you visit and displays their icons on the Chrome Menu. Currently
supports:

- [AmCharts](https://www.amcharts.com/)
- [AMP](https://amp.dev/)
- [AmplifyJS](http://amplifyjs.com/)
- [Angular](https://angular.io/)
- [AngularJS](https://angularjs.org/)
- [ApexCharts](https://apexcharts.com/)
- [Backbone](http://backbonejs.org/)
- [base2](http://code.google.com/p/base2)
- [Bento](https://bentojs.dev)
Expand All @@ -26,6 +28,8 @@ supports:
- [CamanJS](http://camanjs.com/)
- [Can](https://canjs.com/)
- [Closure Library](https://developers.google.com/closure/library/)
- [Chartist](https://github.com/chartist-js/chartist)
- [Chart.js](https://www.chartjs.org)
- [ControlJS](http://stevesouders.com/controljs/)
- [core-js](https://github.com/zloirock/core-js)
- [Create React App](https://create-react-app.dev/)
Expand All @@ -34,6 +38,7 @@ supports:
- [DC.js](http://dc-js.github.io/dc.js/)
- [Dojo](http://dojotoolkit.org)
- [Drupal](https://www.drupal.org/)
- [ECharts](https://echarts.apache.org/en/index.html)
- [Ember.js](https://emberjs.com/)
- [Ext JS](https://www.sencha.com/products/extjs/)
- [Ezoic](https://www.ezoic.com/)
Expand All @@ -43,6 +48,7 @@ supports:
- [FlotCharts](http://www.flotcharts.org/)
- [Framer](https://framer.com/)
- [FuseJS](http://fusejs.io/)
- [FusionCharts](https://www.fusioncharts.com/)
- [Gatsby](https://www.gatsbyjs.org/)
- [Glow](http://www.bbc.co.uk/glow/)
- [Google Maps](https://developers.google.com/maps/)
Expand Down Expand Up @@ -94,6 +100,7 @@ supports:
- [October CMS](https://octobercms.com/)
- [Paper.js](http://paperjs.org/)
- [PhiloGL](http://www.senchalabs.org/philogl/)
- [Plotly](https://plotly.com/javascript/)
- [Pixi.js](http://www.pixijs.com/)
- [Polymer](https://www.polymer-project.org/)
- [Popcorn.js](https://github.com/mozilla/popcorn-js/)
Expand Down
Binary file added icons/amcharts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/apexcharts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/chartist.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/chartjs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/echarts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/fusioncharts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/plotly.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 110 additions & 1 deletion library/libraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -1971,5 +1971,114 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
return false;
}
}
},
'ECharts': {
id: 'echarts',
icon: 'echarts',
url: 'https://echarts.apache.org/en/index.html',
test: function (win) {
if (win.echarts && win.echarts.getInstanceByDom) {
return { version: win.echarts.version || UNKNOWN_VERSION };
}
// detect bundled version
if (win.document.querySelector('[_echarts_instance_]')) {
return { version: UNKNOWN_VERSION };
}
return false;
}
},
'Chart.js': {
id: 'chartjs',
icon: 'chartjs',
url: 'https://www.chartjs.org/',
test: function (win) {
if (win.Chart && win.Chart.registry) {
return { version: win.Chart.version || UNKNOWN_VERSION };
}
// detect bundled version
if ([...win.document.querySelectorAll('canvas')].some(el => el.$chartjs)) {
return { version: UNKNOWN_VERSION };
}
return false;
}
},
'FusionCharts': {
id: 'fusioncharts',
icon: 'fusioncharts',
url: 'https://www.fusioncharts.com/',
test: function (win) {
if (win.FusionCharts && Array.isArray(win.FusionCharts.version)) {
return { version: win.FusionCharts.version.join('.') || UNKNOWN_VERSION };
}
// detect bundled version
if ([...win.document.querySelectorAll('.fusioncharts-container')].some(el => el.FusionCharts)) {
return { version: UNKNOWN_VERSION };
}
return false;
}
},
'AmCharts': {
id: 'amcharts',
icon: 'amcharts',
url: 'https://www.amcharts.com/',
test: function (win) {
if (win.am5 && win.am5.registry) {
return { version: win.am5.registry.version || UNKNOWN_VERSION };
}
if (win.am4core) {
return { version: '4' };
}
if (win.AmCharts) {
return { version: '3' };
}
// detect bundled version
if (win.document.querySelector('.am5-html-container')) {
return { version: '5' };
}
return false;
}
},
'ApexCharts': {
id: 'apexcharts',
icon: 'apexcharts',
url: 'https://apexcharts.com/',
test: function (win) {
if (win.ApexCharts && win.ApexCharts.getChartByID) {
// apex doesn't have a version number attribute
return { version: UNKNOWN_VERSION };
}
// detect bundled version
if (document.querySelector('svg.apexcharts-svg')) {
return { version: UNKNOWN_VERSION };
}
return false;
}
},
'Chartist': {
id: 'chartist',
icon: 'chartist',
url: 'https://github.com/chartist-js/chartist',
test: function (win) {
// detect bundled version
if ([...win.document.querySelectorAll('svg')].some(el => el.attributes['xmlns:ct'])) {
return { version: UNKNOWN_VERSION };
}
return false;
}
},
'Plotly': {
id: 'plotly',
icon: 'plotly',
url: 'https://plotly.com/javascript/',
test: function (win) {
if (win.Plotly && win.Plotly.newPlot) {
return { version: win.Plotly.version || UNKNOWN_VERSION };
}
// detect bundled version
if (win.document.querySelector('.js-plotly-plot')) {
return { version: UNKNOWN_VERSION };
}
return false;
}
},
};