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

175
Views
c3 js zoom api domain explaination

sorry in advance, english is not my native language.

I have a json that looks somewhat like the following:

{
    "Date": "19.09.2021",
    "a": "1100",
    "b": "29500",
    "c": "462",
    "d": " 93.3"
  }

Date is my x axis, and i want to use the c3 zoom api to achieve zooming on the x axis.

For example, I want to be able to zoom to date '23.12.2021'

In the documentation it says => If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.

So i tried to check what lays inside of given domain with the following code =>

onzoom: function (domain) {
                // do something with domain, which is the domain after zoomed
                console.log(domain)
                var foo = JSON.stringify(domain)
                console.log(foo)
            }

which produces something like that ["2021-12-23T04:11:58.624Z","2021-12-23T07:54:23.405Z"]

document.getElementById("button").onclick = function() {load1()};
    function load1(){
        //chart.toggle('a')
        chart.zoom(["2021-12-23T04:11:58.624Z","2021-12-23T07:54:23.405Z"]);}
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!