How to install Chart.js without a library? - chart.js

How can I install Chart.js "manually"?
Chart.js documentation mentions gulp and npm and bower, all Greek to me. I've read about each of them but am not interested in installing other libraries, I just want to draw charts. It appears that bower was not an option for a while and someone on SO claimed Node.js is not required for Chart.js but gave no details of how to install it bare.
I DLed it, unzipped it, put it on my server, and get a "ReferenceError: Chart is not defined" when I try to use it and see that the code references a 'dist' directory that doesn't exist.

You can always use the CDN
https://cdnjs.com/libraries/Chart.js/1.0.2
Hope this helps.

Related

Termux error 502 and error: unable to locate package

today i opened termux for installing node.js on my phone (because i need npm), but it doesn't work, i runned pkg install nodejs but it gave me the error: unable to locate package nodejs.
I checked my connection and i'm connected to wi-fi with a really good speed, so i tried to install another common package to see if the problem was only for the node.js package or in the whole app,
i tried to install git and it gave me the same error.
So i started searching in forums: stackoverflow, github forum, termux wiki, etc...
I tried everything, apt update, pkg update, apt upgrade, pkg upgrade, etc...
Those gave me the error: the error
So, i don't know what to try anymore, please give me an answer, have a nice day.
This error is common one. You should change repository mirror for your termux packages.
Here is the instruction from the official Termux github page.
To select multiple repositories press space. To select new mirror for repositories use space and then enter.
Termux can be used for hacking and many other suspicious things which is definitely against playstore policies. So you just need to uninstall termux playstore version and download termux from F-Droid. That is actual termux not the play store one. You should not face any error in that termux.
Nothing else worked, neither running some command nor changing repo. The only thing which works is downloading termux from F droid

How to include header file for Chart.js after downloading it?

I've recently downloaded Chart.js by first installing node.js from https://nodejs.org/en/
and then ran
npm install chart.js --save
on my command prompt from https://www.chartjs.org/docs/latest/getting-started/installation.html.
I am ready to do some web development and have no clue how to include the Chart.js header file for an HTML program I plan to write. I am using a Windows 10 OS. How would I go about adding the header file (going to use atom for the text editor)? I don't see chart.js after doing "dir", only saw package-lock.json and package.json.

How to have Aspose.Cells 19.10 correctly render fonts in Linux .Net Service?

I am building a .net service in docker that will take .xlsx files and render them as .tiff. When I run my service locally on a windows environment the images correctly render with Times New Roman text. When I spin up a docker container and submit the same file it returns a blank .tiff image.
I have tried numerous approaches to have Aspose.Cells work correctly in the docker container based off the Aspose documentation relating to setting the default font source, default font folder, and font substitution but none of the suggested methods work. Below I listed the approach that I believe should work with Aspose.Cells
Installed fonts-liberation fontconfig and ttf-mscorefonts-installer on the docker container to get access to fonts located in /usr/share/fonts/truetype/
In the service I have set my source to the following:
FontConfigs.SetFontFolder("/usr/share/fonts/truetype/", true);
The true in this statement will scan subfolders to find the .ttf font files. I expect Aspose to use this file path in the docker container to get needed fonts for rendering.
I verified that I have fonts available in the "/usr/share/fonts/truetype/" folder under sub-folders of liberation and msttcorefonts.
Can anyone offer advice of another approach or potential issue I am running into? I can provide more information if needed as well.
Well, there are some guidelines using Aspose.Cells (especially for rendering features) to work on docker container or similar environments which you should refer to. We also recommend you to kindly try using latest version/fix (e.g Aspose.Cells v20.3)
Here are our steps:
The docker we used was: microsoft/dotnet, install it first:
sudo docker pull microsoft/dotnet
When running it, we got an issue in this docker when saving to PDF or image.
We did the following things to sort it out:
We installed libgdiplus:
apt-get update
apt-get install -y libgdiplus
cd /usr/lib && ln -s libgdiplus.so gdiplus.dll
And install libc6-dev:
apt-get install -y --no-install-recommends libc6-dev
Hope, this helps a bit.
PS. I am working as Support developer/ Evangelist at Aspose.

Error installing ember-cli-mocha

I'm trying to setup an EmberJS project using ember-cli. I want to be able to use Mocha/Chai instead of the default qunit, but I am getting an error at the first step on installing ember-cli-mocha.
I create the new ember project with ember new my-project and then from within the project folder I run ember install ember-cli-mocha, selecting Yes to overwrite the tests/test-helper.js.
In the output, immediately following the Installed browser packages via Bower. message I see:
Package ember-cli/ember-cli-test-loader=ember-cli/ember-cli-test-loader not found
I can't find any information on this directly. I've tried installing the various packages themselves, before the ember-cli-mocha package via npm and bower, but I always get that message when installing ember-cli-mocha through ember-cli.
Anyone else have experience with this? Thanks in advance!

Can't "ember server" but "npm start" works

Although I successfully installed ember-cli, I cannot run ember server. It said -bash: ember: command not found. But when I ran npm start, that worked.
According to the package.json file, npm start is referring to ember server.
But why didn't ember server work?
The way I fixed this problem is by running ember init in the repo, and let it override all the testing related files and skip all the files related to the project, like routes/app.js.
Oh, Yeah~
Based on your comments, it sounds like you may have installed npm or another part of the node toolchain with sudo. Here are some common ways to install the toolchain--I can say from experience that avoiding using sudo in package managers (and everything possible) is often the way to go.
Hope this helps--let us know if it was something else.