Skip to content

Releases: pwoidke/Scatterplot-js

Inline point position, color, and width CSS overrides

13 Dec 13:47
Compare
Choose a tag to compare

When creating points, adding the style attribute and setting the background-color property to a color value will set the color of the point. The width property will allow for explicitly setting the width (2 * radius) of the point.

Plot By Class

13 Dec 13:49
Compare
Choose a tag to compare

Points are created with specified (inline) left & bottom CSS values, and then you can call .plot() on their class. Both static and responsive graphs are supported.

Also added functionality to override point color by specifying background-color in CSS of the point.

Static/Responsive Scatterplot Graphs (w/ Units)

13 Dec 13:53
Compare
Choose a tag to compare

This release contains code for a demo page, jQuery, the Scatterplot.js plugin, and scatterplot.css. This plugin allows for a scatterplot-style chart to be created using $(target).scatter(); and for points to be plotted using $(target).plot();.

The responsive option can be added to .scatter(). When set to true, the graph, labels, and points display responsively by using percentages for positioning. These percentages are not perfect, but they will keep everything pretty close to accurate when scaling the scatterplot.

Units can be specified in the settings of .scatter(): xUnits for the units on the X-axis and yUnits for units on the Y-axis. These settings take an array and print the array items evenly spaced along their corresponding axis, such that the first is at the bottom-left corner, and the last is at the right or top edge.