Thanks a lot for your example!
But... I have some problems trying to use this idea with my actual charts.
1) My chart "B" - as well as the chart A, in fact - also affects a list that I have to show (according to the period displayed).
After I did the changes, I have this error ocurring - sometimes:
As if the arrayInfoPaciente that you see in the picture could not be retrieved because the parent object is undefined... But it is not, and you can see the object logged there.
Both of the charts are using dataFunction in order to get the data.
dataFunction of the chart B:
var myData;
function myDataFunction(from, to, step, callback) {
var obj = {
from: from,
to: to,
};
MyService.getMyData(obj).success(function (data) {
myData = JSON.parse(data.value);
console.log("Indicador ITU Cateter Vesical");
console.log(JSON.parse(data.value));
callback({
dataLimitFrom: myData.dataLimitFrom,
dataLimitTo: myData.dataLimitTo,
values: myData.values,
from: myData.from,
to: myData.to,
unit: step
});
});
}
myData is the object that appears to be undefined.
2) If I let the interaction and timeAxis as you did, my second chart does not limit the period to be shown, and it is not true for me, because the data I have to show is only for a specific period - that I am setting on dataLimitFrom and dataLimitTo.
So, can I suppress this piece of the settings:
interaction: {
scrolling: {
limitMode: null // during drag the limits can be exceeded
},
snapMode: null // snap will be done by the first chart
},
timeAxis: {
minUnitWidth: 1e-9, // min and max unit widths will be
maxUnitWidth: 1e9 // enforced by the first chart
},
?