GithubHelp home page GithubHelp logo

Comments (4)

benmccann avatar benmccann commented on June 30, 2024

This library does not require Luxon. You can use Moment instead

However, the sample should work if you add the required polyfill for Luxon:

<script src="https://cdn.polyfill.io/v2/polyfill.js?features=default,String.prototype.repeat,Array.prototype.find,Array.prototype.findIndex,Math.trunc,Math.sign"></script>

from chartjs-chart-financial.

andrericardo avatar andrericardo commented on June 30, 2024

I've tried to replicate the issue with the luxon code called from the example in chartjs-chart financial using the polyfill with

<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=default,String.prototype.repeat,Array.prototype.find,Array.prototype.findIndex,Math.trunc,Math.sign"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.js"></script>
<script type="text/javascript">
var dateStr = '01 Apr 2017 00:00 Z';
var date = luxon.DateTime.fromRFC2822(dateStr);
console.log(date);
</script>
</head>
<body></body>
</html>

Ran into another set of errors

Screen Shot 2019-10-08 at 23 38 08

from chartjs-chart-financial.

benmccann avatar benmccann commented on June 30, 2024

If you're not able to get Luxon to work, the other method would be to use Moment.

Remove:

<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> 

Add:

https://cdn.jsdelivr.net/npm/[email protected]/moment.min.js

from chartjs-chart-financial.

andrericardo avatar andrericardo commented on June 30, 2024

Thank you for your help @benmccann, I was not aware that luxon was needed in dev for the examples not for chartjs-chart-financial.

from chartjs-chart-financial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.