Components Interactions Examples Tutorials API FAQ


Q. How do I tell the Plottable developers about a problem?

A. Reach out to us on our Gitter with questions, or file an issue on Github to let us know about a bug or a feature request.

Q. Which browsers are supported?

A. Plottable currently supports Chrome, Firefox, Internet Explorer 9 and later, and desktop and mobile Safari.

Q. What is the difference between component.detach() and component.destroy()?

A. Detaching a Component removes it from its parent container (this could be a Group, a Table, or the SVG it is rendered to). This Component still exists and retains most of the state that has been applied to it (one exception is that dragBoxLayers will forget the bounds on their boxes). The Component can later be reattached to a Group or Table, or re-rendered to an SVG. Destroying a Component is more permanent. Once a component is destroyed, it no longer exists, and cannot be added to a Group or Table or be rendered to an SVG. Both detaching and destroying a Component cause the Component to stop taking up space, and a Table may re-layout to reflect that.

Q. How do I add gridlines to a Plot?

A. Gridlines are a Component. In order to put two Components in the same cell of a table, you should put them in a Group. That group can be rendered to an SVG or placed in a table, just like any other Component, as below:

// Code to put Gridlines in a Group
var plot = ...
var gridlines = new Plottable.Components.Gridlines(xScale, null);
var group = new Plottable.Components.Group([plot, gridlines]);


The Gridlines documentation can be found here.

Q. How do I set the end values on a Scale?

A. Plottable automatically sets the domain of Scales to fit all of the data on all Plots that are watching the Scales. However, if you know the minimum and maximum values that you want to show on a Plot, you can set .domain() on the Scales. For example, if you want the Plot to span from 0 to 100 in the x direction, regardless of data values, you can call xScale.domain([0, 100]).

Q. How do I customize a time axis?

A. We are adding a Time Axis Tutorial to the website soon! In the meantime, ask us questions on our Gitter.

Q. I want to add a different set of data to my Plot. Do I have to destroy and redraw everything?

A. There are two options.

If you want to update the data in a dataset that is already on a Plot, you can use the endpoint, and any Plots watching that dataset will update with the new data.

If you want to change which datasets are on a Plot, you can reset all the datasets on that Plot using plot.datasets(datasets) call.

Q. How do I learn which CSS stylings to use for different parts of Plottable?

We are adding a Stylings Tutorial to the website soon! In the meantime, ask us questions on our Gitter.