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"]);}