Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

343
Views
Could I send serialized data in Django to JSON dataframe chart.js?

below I send example of candlestick charts.js date structure - (JSON type):

 <script>
    const data1 = luxon.DateTime.fromRFC2822('15 Dec 2021 00:00 GMT');
    const date2 = luxon.DateTime.fromRFC2822('16 Dec 2021 00:00 GMT');
    const data = {
      datasets: [{
        data: [
        {
          x: data1.valueOf(),
          o: 1,
          h: 0.75,
          l: 0.75,
          c: 1.25
        },
        {
          x: date2.valueOf(),
          o: 1.20,
          h: 1.5,
          l: 0.75,
          c: 0.9
        }
        ],
      }]
    };

    // config 
    const config = {
      type: 'candlestick',
      data,
      options: {}

    };

    // render init block
    const myChart = new Chart(
      document.getElementById('myChart'),
      config
    );
    </script>

It seems similar to serializers? So I wonder if it is possible to send it in context to make this json like data

enter image description here

And seems...

const data = {{data}}

enter image description here doesn't work... :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!