Added the ability to disable tracing of curves and clicking of points to show coordinates using the traceconstructor option

Added the linksconstructor option to allow disabling external links in notes and folders, as well as links to help documentation in the expressions list for certain situations (like regressions with negative R2 values or plotted expressions with unresolved detail)

Changed the graphing calculator's singleVariableSolutionsconstructor option default to false, and deprecated the option. It will be removed in future API versions.

Added a destructor for GraphingCalculator and BasicCalculator instances to unbind listeners and free resources.

Reduced the size of graph states returned from GraphingCalculator.getState by eliding default settings and expression properties. In many cases, this reduces the size of saved states by more than 50%.

Added an autosizeconstructor option to control automatic resizing behavior. Because this option is enabled by default, it is no longer required to call .resize() when updating the calculator's dimensions.

Changes in v0.8

API changes:

Desmos.Calculator constructor renamed to Desmos.GraphingCalculator. Desmos.Calculator will be retained as a legacy alias indefinitely for backwards compatibility.

Deprecated calculator.setGraphSettings in favor of calculator.updateSettings. calculator.updateSettings is now available as part of all three calculators.

Renamed calculator.graphSettings observable property to calculator.settings. calculator.graphSettings will be retained as a legacy alias for backwards compatibility.

Added the ability to set the language of the calculator through the API. A particular set of languages can be loaded as part of the API file by specifying a lang URL parameter in the API script src. The language of a calculator instance can be set and updated using the calculator.updateSettings function.

Added the ability to provide a custom color palette using the colors constructor option. Colors of existing states can be optionally remapped by passing the {remapColors: true} option to calculator.setState.

calculator.setState and calculator.setBlank now clear the undo/redo history by default. To preserve the history after either operation, pass in an additional argument of {allowUndo: true}.

Added a calculator.setDefaultState method to allow replacing the “Delete All” button with a “Reset” button that sets a custom default state instead of the blank state.

Added restrictedFunctions constructor option to the graphing calculator that removes certain functionality that may not be allowed in some testing environments.

Added qwertyKeyboard constructor option to the graphing and scientific calculators that allow changing the QWERTY keyboard to an alphabetical layout to comply with requirements of certain testing environments.

Graphing calculator changes

The calculator is now accessible to screen readers. When a screen reader is active, math expressions are read as you navigate and edit them, and plotted curves can play an audio representation of the whole curve, or read coordinates of a keyboard-controlled trace point. See our accessibility documentation for more information.

Individual points like (1,2) can now be made draggable by long-pressing their expression icon and selecting a drag mode.

1/0 evaluates to undefined instead of Infinity.

You can now paste tables of data with more than two columns.

Slider and domain bounds have been switched from numerical inputs to mathquill inputs, and can accept expressions like π/2.

New Examples:

Changes in v0.7

File Size (gzipped): 467kb

API changes:

Added observable change event to the calculator that can be used to determine when a user's work should be persisted.

Added secret folders. When a calculator is created with the {administerSecretFolders: true} option, users will be allowed to create secret folders and see their contents. When loaded into a calculator with {administerSecretFolders: false} (the default), secret folders are hidden from users, but their contents are still graphed, and any functions or variables defined in secret folders can still be used. This workflow is useful for creating activities that ask students to describe the properties of unknown functions.

The solutions constructor option has been split into separate pointsOfInterest and singleVariableSolutions options.

New color palette for plotted curves. Saved graphs will automatically have
colors translated from the old palette to the new palette when they are loaded
into new versions of the API.

Name

v0.6

v0.7

Colors.RED

#c0504d

#c74440

Colors.BLUE

#4f81bd

#2d70b3

Colors.GREEN

#9bbb59

#388c46

Colors.PURPLE

#8064a2

#6042a6

Colors.ORANGE

#f79646

#fa7e19

Colors.BLACK

#000000

#000000

Changes in v0.6

File Size (gzipped): 679kb

API changes:

Improved behavior of calculator when its container element is not visible, or not in the DOM.

Fixed bug where resizing a calculator could inappropriately change the mathBounds of the graphpaper.

Added targetPixelRatio option to calculator.screenshot, which is useful for producing oversampled images that display well on high pixel density (“retina”) screens. Defaults to 1. Previous versions of the API behaved as if this option was instead set to window.devicePixelRatio, which meant that if the client was on a retina device, screenshots would actually have dimensions twice as large as specified.

Removed Desmos.Colors.next method. Desmos.Colors is now just a list of the 6 hexidecimal colors that we use for graphs in the calculator.

New Examples:

Calculator changes:

Improved frame rate when animating with sliders, and during zooming and panning.

Changes in v0.5

File Size (gzipped): 693kb

API changes:

Added support for creating tables using calculator.setExpression by passing an expression object with type: 'table' and a columns property.

Added the ability to specify slider bounds and parametric domain bounds with the optional sliderBounds and domain expression properties.

Added methods for mapping between math and pixel coordinates, calculator.mathToPixels and calculator.pixelsToMath, and observable property calculator.graphpaperBounds for being notified when the math or pixel coordinates of the graphpaper boundaries change.

Added calculator.setMathBounds as a replacement for calculator.setViewport to be consistent with calculator.graphpaperBounds.mathCoordinates. Note that the argument to calculator.setMathBounds is an object with top, bottom, left, and right properties, whereas the argument to calculator.setViewport was an array with 4 elements. calculator.setViewport is still available for backwards compatibility, but may be deprecated in a future version.

Added ability to set graph display properties via calculator.setGraphSettings and observe these properties through calculator.graphSettings.

Added support for externally deleting the currently selected expression, independently of the expression list, through the calculator.removeSelected method, and the calculator.isAnyExpressionSelected observable property. Note that these methods are likely to be superseded by richer ways of manipulating (possibly multiple) selected expressions in the future.

Added support for external mathquill input mechanisms through the new calculator.focusedMathQuill observable property. This property gives access to the currently focused mathquill object when there is one, allowing direct use of the Mathquill API. Note that we are currently using the dev branch of Mathquill, which we expect will become master before API v0.5 is stabilized.

The id expression property became optional. calculator.setExpression({latex: 'y=x'}) is now a valid way to create a line, but note that it is not currently possible to manipulate an expression through the API after it is created unless an id is specified.