GithubHelp home page GithubHelp logo

Comments (4)

benmccann avatar benmccann commented on July 17, 2024

Yes, the random data is generated here: https://github.com/chartjs/chartjs-chart-financial/blob/master/docs/utils.js

You need to create an object with o, h, l, c just like this random script does

from chartjs-chart-financial.

rashearth avatar rashearth commented on July 17, 2024

Thanks for your kind reply.

Usually for the charts.js, we need to input data below.
Could you tell me how to input the data for the candlestick version?
(How could I write it? Is it like
o:105.31, h:105.67, l: 105.00, c:105.60 ?? I don't know the correct way to input data.)

var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
    type: 'candlestick',
    
       data: {
            labels: [


"2017.12.11",
"2017.12.12",


],
            datasets: [
                {
                    label: "Actual Data",
                    backgroundColor: "rgba(226,240,217,0.4)",
                    borderColor: "rgba(0,176,80,1)",
                    pointBackgroundColor: "rgba(0,176,80,1)",
                    pointBorderColor: "#fff",
                    pointHoverBackgroundColor: "#fff",
                    pointHoverBorderColor: "rgba(0,176,80,1)",
                    pointHitRadius: 10,
                    data: [

//"Could you give me some samples for how I could insert the data?"
**106.26,**
**106.29,**

]
                },

from chartjs-chart-financial.

benmccann avatar benmccann commented on July 17, 2024

data: [{o:105.31, h:105.67, l: 105.00, c:105.60}, {o:105.31, h:105.67, l: 105.00, c:105.60}]

from chartjs-chart-financial.

rashearth avatar rashearth commented on July 17, 2024

Thanks a lot!!

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.