You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, we can create the new lineChart.curve() which takes a curve object, but leave lineChart.interpolate(), still taking a string but instantiating the right curve object based on the old names of interpolations. We should deprecate interpolate using dc.logger.deprecate, and remove it in 3.1 or later.
@kum-deepak, I think we can leave tension the way you have implemented it in _interpolateWithTension, but instead of silently dropping tension when it's not applicable, we should warn the user in the browser console, "Tension specified for a curve that doesn't support it, ignored"
The text was updated successfully, but these errors were encountered:
This is a good idea. It has some additional benefit. See below.
I also wanted to change the behavior of tension a little bit. In the previous version the default value was 0.7 while this made the output look different, after changing to 0 it looks similar. So, in all likelihood interpretation of tension has changed within D3.
I was thinking to set value of default tension to null instead of 0. That way if someone did not set it we do not try to apply it.
This also has one benefit that one can apply the tension to the d3 curve function before passing it to chart.curve (like chart.curve(d3.curveCardinal.tension(0.5))). As tension will not be reapplied, it will work as expected.
Since d3 has replaced
d3.svg.line.interpolate
withd3.line.curve
, we should too. But we have the opportunity to do it in a mostly backward-compatible way.First, we can create the new
lineChart.curve()
which takes a curve object, but leavelineChart.interpolate()
, still taking a string but instantiating the right curve object based on the old names of interpolations. We should deprecateinterpolate
using dc.logger.deprecate, and remove it in 3.1 or later.@kum-deepak, I think we can leave
tension
the way you have implemented it in _interpolateWithTension, but instead of silently dropping tension when it's not applicable, we should warn the user in the browser console, "Tension specified for a curve that doesn't support it, ignored"The text was updated successfully, but these errors were encountered: