I want to be able to use chart,js offline and run it locally on a webpage.
so the original way to run it which works is to source the following:
<script src='https://cdn.jsdelivr.net/npm/chart.js'></script>
when i download the github files
https://github.com/chartjs/Chart.js/releases/download/v4.2.0/chart.js-4.2.0.tgz
I upack the content in a folder on the same level as my htm page
OR
I install chart,js thorugh npm and copy/paste the files in a folder on the same level as my htm page
and then i source the chart.js file like this
<script src='chart/dist/chart.js'></script>
It doesn't work.....
my graphs wont load.
I even tried copying the content of file
https://cdn.jsdelivr.net/npm/chart.js
and pasting it in a chart.js file, but still it doesn't show my graphs, while if i would source it form the the site above it shows my graphs perfectly
I was running into the same error, I downloaded the package and unpacked it into /scripts/chartjs/ under www-root.
That folder has now this content:
02/13/2023 08:59 PM <DIR> .
02/13/2023 08:59 PM <DIR> ..
02/13/2023 08:59 PM <DIR> auto
02/13/2023 08:59 PM <DIR> dist
02/13/2023 08:59 PM <DIR> helpers
10/26/1985 02:15 AM 1,093 LICENSE.md
10/26/1985 02:15 AM 4,359 package.json
10/26/1985 02:15 AM 2,640 README.md
3 File(s) 8,092 bytes
5 Dir(s) 711,093,805,056 bytes free
I call the package in my html header with
<script src="/scripts/chartjs/dist/chart.umd.js"></script>
It works. Unfortunately the documentation is not very clear.
Related
Roundcube can read compressed files without the extension c.f. example below:
-rwxr-x--- 1 vmail vmail 5170815 Jun 20 10:14 1529504317.M895396P3597.mailstore-clone,S=7142774,W=7235655:2,S
Using the file command on the same file returns:
1529504317.M895396P3597.mailstore-clone,S=7142774,W=7235655:2,S: gzip compressed data, from Unix
New files are being compressed using zlib plugin, and I need to compress all the remaining old mail files so they will be still readable in Roundcube. Is it possible to somehow activate zlib plugin on existing mails already in the inbox?
I have taken a copy of an OpenCart installation (version 2.0.3.1) and put on to Windows localhost.
I've fixed a couple of the issues, but I've now come up against an error that I can't resolve:
Fatal error: Class 'Config' not found in ..\index.php on line 31
I've searched Google, but no-one else seems to have come across the same problem.
Can someone tell me where this class resides?
The relevant lines in the index.php file are:
CODE:
23 // Registry
24 $registry = new Registry();
25
26 // Loader
27 $loader = new Loader($registry);
28 $registry->set('load', $loader);
29
30 // Config
31 $config = new Config(); // HERE
32 $registry->set('config', $config);
I got this error - but it was due to me adding config.php to my .gitignore file.
I only wanted to ignore my settings files but this caused the config.php class file to also be ignored from the /system/library folder (same name!)
just make sure that config.php exists in the library folder - but make sure it contains config class - not your oc settings!
I faced the same issue while integrating it on the local machine. Follow these steps, it might help:-
Download the opencart package of version 2.0.3.1 from the website or download from this link: https://www.opencart.com/index.php?route=download/download/success&download_id=41
Open the downloaded folder and navigate to System/library folder.
Copy config.php file from there and paste in your project location in the same folder System/library.
It will ask to replace the file, do that and it should solve the problem.
Also, make sure you have written something like this on top of index file or not require_once('config.php');
I hope this helps.
I am trying to set up and run LibreCAD and I am following their Build From Source Guide.
At some point, and after installing QT and boost, I reach the step where it says this:
To change these default settings you have to create the file
scripts/custom-windows.bat and overwrite the different settings
without effect to the SCM (git). Example for
scripts/custom-windows.bat:
set Qt_DIR=C:\Qt\5.4
set NSIS_DIR=C:\PROGRA~2\NSIS
set MINGW_VER=mingw491_32
So I created a custom-windows.bat file and overwrote the settings. Now, and since I am working on 64 bit Windows, They are saying that I need to do this:
There are issues with the NSIS_DIR path on 64 Bit Windows. When NSIS
is installed in the Program Files (x86) folder and NSIS_DIR is added
to the PATH, something goes wrong in the build process.
In this case use the command dir /X \ and get an output like this:
09/02/2014 09:50 PM <DIR> PROGRA~1 Program Files
10/27/2014 12:33 PM <DIR> PROGRA~2 Program Files (x86)
08/16/2014 10:49 PM <DIR> Qt
But what does that mean? "..use the command dir /X \ and get the output.." Where and how? Appreciate it if anyone could tell me how to solve that.
Open up a command prompt and literally type dir /X \. The output will show the mapping between the short folder names and the long ones.
Your goal is to use the correct short form representation for Program Files (x86) in NSIS_DIR, since it's not always PROGRA~2. It can vary from filesystem to filesystem, based on the history of the filesystem.
If I have a repository in bower_components containing a folder with 50 JS files, I cannot include them one at a time in my Brocfile with app.import(). How do I include them all in the same call?
If I try to app.import an entire directory of js files, I get this error on compilation:
You must pass a file to 'app.import'. For directories specify them to the constructor under the 'trees' option.
what you are loocking for is the broccoli-static-compiler npm package which manage this perfectly, you can get it there : https://www.npmjs.com/package/broccoli-static-compiler and it's provieded with a nice documentation.
I have tried to execute phpunit with xdebug for code coverage as below,
C:\wamp\bin\php\php5.3.22>phpunit -coverage-html /tmp C:\<unittest file pat>\TestRetainer.php
and it is giving output as follows,
PHPUnit 3.7.32 by Sebastian Bergmann.
....
Time: 36 ms, Memory: 5.75Mb
OK (4 tests, 12 assertions)
C:\wamp\bin\php\php5.3.22>
But i am unable to find the html version of report file.
I had gone through this url http://phpunit.de/manual/current/en/phpunit-book.html#code-coverage-analysis. But i do not find any luck.
Please help me on this.
For Linux, run command in the project root.
./vendor/bin/phpunit --coverage-html reports/
This will create a folder named reports in your project root.
For Windows:
C:\wamp\bin\php\php5.3.22>phpunit --coverage-html tmp C:\<unittest file pat>\TestRetainer.php
This will create a tmp folder inside php5.3.22, where your test report will generate.
Better if you keep reports inside your project root.
C:\wamp\htdocs\<project root> >phpunit --coverage-html tmp TestRetainer.php
It looks like you're mixing Linux paths and windows paths:
C:\wamp\bin\php\php5.3.22>phpunit --coverage-html /tmp C:\<unittest file pat>\TestRetainer.php
You're trying to write the coverage files to a folder called /tmp. On a Linux system this is a folder called tmp in the root of the drive. Change that to a Windows path (C:\tmp maybe?) and it should work.