Skip to content

Version 2.0.0

Compare
Choose a tag to compare
@etimberg etimberg released this 09 Apr 12:08

The release of Chart.js 2.0.0 adds many new features over version 1. Documentation is available at http://nnnick.github.io/Chart.js/docs-v2/

Major new features

  • Charts that combine visual types such as bars and lines
  • Chart titles
  • Built-in legends that are interactive by default
  • New scale types including native logarithmic and time/date support
  • Multiple X and Y axes are supported
  • Stacked bar and area charts
  • Tooltip customization
  • Enhanced ability to modify the chart data dynamically.
  • Generic layout system for placing objects on the canvas
  • Controllers for each dataset that are easy to extend

Features since 2.0.0-beta2

  • Allow setting the number of tick marks using ticks.maxTicksLimit (#1859) Thanks @morleyzhi
  • Performance improvements when charts have a lot of data (#1882). Big thanks to @mathiask88
  • Allow custom point styles including any canvas image object. (#1905). Thanks @mathiask88
  • Improved test coverage for dataset controllers
  • Added global default font options to customize all fonts at once
  • Added ticks.stepSize to the linear scale. Allows setting a fixed delta between tick marks . (#1978). Thanks @roben
  • Added browserify build. dist folder now has bundled versions that include moment.js (#2007) Thanks @tannerlinsley
  • Updated all sample files to consistent style (#2018). Big thanks to @hamalaiv
  • Allow the time scale to use multiples of the base units (second, minute, etc). (#2101)
  • Exposed xAlign and yAlign options for tooltips. (#2116). Thanks @100000001
  • Clip chart objects outside of chart area in preparation for zoom and pan support. #2209
  • Added ticks.min and ticks.max support to the category scale. The value of these settings must be something in the data.labels array. #2209
  • Allow percentages as max-width and max-height styles on parent container (#2081)

Bug fixes since 2.0.0-beta2

  • Draw borders at edge of scales (#1740)
  • Improved scale fitting (#1766)
  • Prevent flickering of bars that represent NaN data (#1822)
  • Add suggestedMin, suggestedMax, min, and max options to radial linear scale (#1461)
  • Better support for stacking bars correctly (#1862)
  • Don't use undefined axis constructors (#1871)
  • Allow drawing a line chart with points on (#1882). Thanks @mathiask88
  • First and last ticks are always shown on the axis. (#1884)
  • Fixed an issue with undefined functions when trying to align tooltips. (#1891). Thanks @davis
  • Fixed an issue with numerical error on the linear axis (#1890)
  • Fixed an issue when an axis was reversed (#1907)
  • Fixed an issue when resizing and the animation duration was 0ms. (#1910). Thanks @mathiask88
  • Fixed an issue where the last grid line of an axis was drawn differently. (#1914)
  • Fixed an issue when a new dataset was added to a chart with time scales (#1917)
  • Fixed min and max settings for time scales (#1941)
  • Made it easier to use axis callbacks to change ticks array (#1942)
  • Disabled auto-skipping in time scale by default (#1962)
  • Fixed an issue with stacked bar charts (#1963)
  • Fixed an issue where lines were not shown in combo charts (#1971)
  • Take padding into account when calculating model coordinates from event coordinates (#1996)
  • Fixed bar and doughnut chart animations (#2022)
  • Fixed stacking tooltip order (#2027). Thanks @tannerlinsley
  • Allow the user to specify the alpha value for tooltip colours. (#2036) Thanks @hamalaiv
  • Fixed animation bug where tooltips did not always fade away (#2037)
  • Allow line chart point radius to be set to 0. (#2040)
  • Fixed on-canvas legend generation when no datasets are present (#2070)
  • Improved custom time parsing (#2086). Thanks @MatthiasWinkelmann
  • Fixed an issue when reseting the page zoom to 100% (#1904)
  • Throw an error in the time scale when created if moment is not defined. (#2110)
  • Better support when there is no datasets object in the chart data (#2115)
  • Fixed missing whitespace & code markup errors in documentation. (#2125). Thanks @The-Smallest
  • Allow borders on rectanges to be skipped (#2128). Thanks @The-Smallest
  • Fixed axis IDs error in documentation (#2131)
  • Add support for v2 branch in composer.json (#2133). Thanks @borancar
  • Better use of default scale types (#2154)
  • Better merging when the xAxes object is specified but the type is not (#2157)
  • Removed unnecessary default padding (#2173). Thanks @niemyjski