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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meteor installation #1

Open
micha1983 opened this issue Feb 25, 2017 · 5 comments
Open

meteor installation #1

micha1983 opened this issue Feb 25, 2017 · 5 comments

Comments

@micha1983
Copy link

Hi,

i want to implement the plugin in a meteor project where chartjs is used.
do somebody know where i should copy the plugin files that every is working fine?

with npm i. the plugin will be installed on server side.

@wrydere
Copy link

wrydere commented Oct 12, 2017

I have a similar request, but I'll phrase it slightly differently: would it be possible to get a version of this plugin that does not use NPM?

I'm using chartjs in a Rails app and would like to just throw a javascript file into my asset folder and use it, without the setup or config overhead of npm.

@AlbinoDrought
Copy link
Owner

Hey @wrydere ,

Built versions of the plugin are available on the releases page - these are the same as the ones used in the samples, and should be compatible with regular js.

Usage would be something similar to: (requires the Chart.js bundle as well)

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.bundle.min.js"></script>
<script src="./chartjs-plugin-downsample.js"></script>

(there's nothing in the readme about this - woops!)

As of this comment the latest release is 5 commits old, but those 5 commits are just doc/package changes. Let me know if there's any issues.


As for @micha1983 , sorry, I've never used meteor - I've got no clue. Possibly similar to the above (plain js files)?

@wrydere
Copy link

wrydere commented Oct 12, 2017

@AlbinoDrought thank you much!

I've got it installed - but when I run .downsample() on an instance of a Chart, I get

Uncaught TypeError: Cannot read property 'x' of undefined

Specifically seems to be line 77 of the plugin, it always throws an error when trying to process

var pointAX = data[a].x * 1, // enforce Number (value may be Date)

Any tips? Thanks again.

Edit: I should mention I'm trying to use this with Chart.js 2.7.0, is there a recommended version that downsampling is compatible with?

@AlbinoDrought
Copy link
Owner

Hey @wrydere ,

Not sure what's going on there, any chance you can make a fiddle?

Here's one using Chart.js 2.7.0, the downsample plugin from the releases page, and .downsample on the chart instance: https://jsfiddle.net/yu56fnnv/1/

@wrydere
Copy link

wrydere commented Oct 13, 2017

@AlbinoDrought - thanks, the fiddle helped. I'm passing my data as a simple array of integers, rather than the Point based structure – I think switching to using Points rather than Number should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants