-
Notifications
You must be signed in to change notification settings - Fork 221
Upgrading to 2.0.0
Hey there! We recommend using Plottable 3.0.0 to get the latest and greatest changes. See Upgrading to 3.0.0.
This is a list of all changes between v2.0.0 and v1.16.2 of Plottable.
We are fixing a bug on Interaction.Pointer
in a way that changes the way it behaves when Plottable charts are blocked by other DOM elements. We had previously fixed the behavior in v1.14.0, but wound up up rolling back the change in v1.16.1 to avoid surprising users who were depending on the old behavior. To clearly indicate the change in behavior, we are releasing this change as v2.0.0 instead of v1.17.0.
v2.0.0 is also built with Typescript 1.7 and includes some improvements to the type definitions.
Interactions.Pointer
callbacks will no longer trigger under modals or other overlays that overlap Component
s. Most tooltip libraries draw tooltips as an overlaying element. Add the following CSS to tooltips to avoid having them block pointer events:
.tooltip {
pointer-events: none;
}
See https://jsfiddle.net/aytdd8ub/ for an example using Bootstrap.
Plottable now uses Typescript 1.7. Consequently, methods that return the calling object now return this
instead of the class-type:
class Label {
public text(text: string): Label; // OLD
public text(text: string): this; // NEW
}
This change fixes problems caused by attempting to chain methods defined on a parent class (#2504). Please upgrade to Typescript 1.7 for development.
The "cropped rendering" performance option on Plots.StackedArea
has been temporarily disabled as it does not work as intended (see #3032).
-
Plots.Wheel
has been removed, since it was an incomplete implementation and its use case is better covered byPlots.Rectangle
. - Removed the following deprecated methods and fields:
Axis._computedHeight
Axis._computedWidth
Axis.tickLength()
Formatters.relativeDate()
Plot._visibleOnPlot()
Plots.Bar._visibleOnPlot()
Plots.ScatterPlot._visibleOnPlot()
These changes only affect users who are subclassing Dispatcher
:
The internal architecture of Dispatcher
has been redone. The main change is that subclasses now register callbacks by event name, rather than having to manage CallbackSet
s:
// NEW DESIGN
protected _addCallbackForEvent(eventName: string, callback: Function): void;
protected _removeCallbackForEvent(eventName: string, callback: Function): void;
protected _callCallbacksForEvent(eventName: string, ...args: any[]): void;
In addition, some internal fields have been renamed for clarity.
Summary of changes:
-
protected
_eventToCallback
-->_eventToProcessingFunction
-
_setCallback()
and_unsetCallback()
replaced by_addCallbackForEvent()
and_removeCallbackForEvent()
. -
_callCallbacksForEvent()
added. -
protected
_callbacks
array removed. -
private
CallbackSet
s removed and replaced with registration-strings.
- A
QuantitativeScale
with padding no longer locks up if both ends of its domain are set to the same value (#3019).