Repository: tradingview/lightweight-charts
Pull request #481 (2020-06-15 16:10:45)

TextWidthCache refactoring & tests
**Type of PR:** <!-- bugfix, enhancement, fix typo, etc -->

**PR checklist:**

- [ ] Addresses an existing issue: fixes #
- [x] Includes tests
- [x] Documentation update (not required)

**Overview of change:**

No signature changes.

Added some tests.

Changed the cache from `Record<string, { tick: number, width: number}>` to just `Record<string, number>`

Fixed `__proto__` and `prototype` were read from cache object proto

Changed a ticks2indices record with even growing indices into a cyclic array structure,

-10 bytes .min.gz :grin: 

**Is there anything you'd like reviewers to focus on?**

<!-- optional -->

The `private _cache` can be a `Map<string, number>` as well. It's an easy change and I can apply it if you wish.


Patch:
diff --git a/.eslintrc.js b/.eslintrc.js
index b436c7a3a..64c6310ca 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -4,32 +4,11 @@ module.exports = {
 		es6: true,
 		node: true,
 	},
-	plugins: ['markdown'],
 	extends: 'eslint:recommended',
 	parserOptions: {
 		ecmaVersion: 2015,
 		sourceType: 'module',
 	},
-	overrides: [
-		{
-			files: ['**/*.md'],
-			processor: 'markdown/markdown',
-		},
-		{
-			files: ['**/*.md/*.js'],
-			env: {
-				browser: true,
-				node: false,
-			},
-			globals: {
-				LightweightCharts: false,
-			},
-			rules: {
-				'no-console': 'off',
-				indent: ['error', 4],
-			},
-		},
-	],
 	rules: {
 		// enforces return statements in callbacks of array's methods
 		// http://eslint.org/docs/rules/array-callback-return
diff --git a/docs/3.0-breaking-changes.md b/docs/3.0-breaking-changes.md
index 41136e167..3b39e4dd1 100644
--- a/docs/3.0-breaking-changes.md
+++ b/docs/3.0-breaking-changes.md
@@ -1,42 +1,42 @@
 # Version 3.0 breaking changes
 
 Lightweight charts library 3.0 announces the major improvements: supporting two price scales and improving the time scale API.
-In order of keep the API clear and consistent, we decided to allow breaking change of the API.
+In order of keeping API clear and consistent, we decided to allow breaking change of the API.
 
-In this document you can find the migration guide from the previous version to 3.0.
+In this document you can find migration guide from previous version to 3.0.
 
 ## Time Scale API
 
-Previously, to handle changing visible time range you needed to use `subscribeVisibleTimeRangeChange` and `unsubscribeVisibleTimeRangeChange` to subscribe and unsubscribe from visible range events.
+Previously to handle changing visible time range you needed to use `subscribeVisibleTimeRangeChange` and `unsubscribeVisibleTimeRangeChange` to subscribe and unsubscribe from visible range event.
 These methods were available in the chart object  (e.g. you call it like `chart.subscribeVisibleTimeRangeChange(func)`).
 
-In 3.0 in order to make API more consistent with the new API we decided to move these methods to [time scale API](./time-scale.md)
+In 3.0 in order to make API more consistency with the new API we decided to move these methods to [time scale API](./time-scale.md)
 (along with the new subscription methods [`subscribeVisibleLogicalRangeChange`](./time-scale.md#subscribevisiblelogicalrangechange) and [`unsubscribeVisibleLogicalRangeChange`](./time-scale.md#unsubscribevisiblelogicalrangechange)).
 
-So, to migrate your code to 3.0 you just need to replace:
+So, to migrate your code to 3.0 you need to just replace:
 
 - `chart.subscribeVisibleTimeRangeChange` with `chart.timeScale().subscribeVisibleTimeRangeChange`
 - `chart.unsubscribeVisibleTimeRangeChange` with `chart.timeScale().unsubscribeVisibleTimeRangeChange`
 
 ## Two price scales
 
-We understand disadvantages of breaking changes in the API, so we have not removed support of the current API at all, but have deprecated it, so the most common cases will continue to work.
+We understand disadvantages of breaking changes in the API, so we have not removed support of the current API at all, but have deprecated it, so the most common cases will continue working.
 
-You could refer to the new API [here](./price-scale.md).
+You could refer new API [here](./price-scale.md).
 
 Following are migration rules.
 
 ### Default behavior
 
-Default behavior is not changed. If you do not specify price scale options, the chart will have the right price scale visible and all the series will assign to it.
+Default behavior is not changed. If you do not specify price scale options, the chart will have right price scale visible and all the series will assign to it.
 
 ### Left price scale
 
-If you need the price scale to be drawn on the left side, you should make the following changes.
+If you need the price scale to be drawn on the left side, you should make following changes.
 instead of
 
 ```javascript
-const chart = LightweightCharts.createChart(container, {
+var chart = LightweightCharts.createChart(container, {
     priceScale: {
         position: 'left',
     },
@@ -46,7 +46,7 @@ const chart = LightweightCharts.createChart(container, {
 use
 
 ```javascript
-const chart = LightweightCharts.createChart(container, {
+var chart = LightweightCharts.createChart(container, {
     rightPriceScale: {
         visible: false,
     },
@@ -59,19 +59,19 @@ const chart = LightweightCharts.createChart(container, {
 then specify target price scale while creating a series:
 
 ```javascript
-const histSeries = chart.addHistogramSeries({
+var histSeries = chart.addHistogramSeries({
     priceScaleId: 'left',
 });
 ```
 
-New version fully supports this case via the old API, however this support will be removed in the future releases.
+New version fully supports this case via old API, however this support will be removed in the future releases.
 
 ### No price scale
 
 To create chart without any visible price scale, instead of
 
 ```javascript
-const chart = LightweightCharts.createChart(container, {
+var chart = LightweightCharts.createChart(container, {
     priceScale: {
         position: 'none',
     },
@@ -81,7 +81,7 @@ const chart = LightweightCharts.createChart(container, {
 use
 
 ```javascript
-const chart = LightweightCharts.createChart(container, {
+var chart = LightweightCharts.createChart(container, {
     leftPriceScale: {
         visible: false,
     },
@@ -91,14 +91,14 @@ const chart = LightweightCharts.createChart(container, {
 });
 ```
 
-New version fully supports this case via the old API, however this support will be removed in the future releases.
+New version fully supports this case via old API, however this support will be removed in the future releases.
 
 ### Creating overlay
 
 To create an overlay series, instead of
 
 ```javascript
-const histogramSeries = chart.addHistogramSeries({
+var histogramSeries = chart.addHistogramSeries({
     overlay: true,
 });
 ```
@@ -106,22 +106,22 @@ const histogramSeries = chart.addHistogramSeries({
 use
 
 ```javascript
-const histogramSeries = chart.addHistogramSeries({
+var histogramSeries = chart.addHistogramSeries({
     // or any other _the same_ id for all overlay series
     priceScaleId: '',
 });
 ```
 
-New version fully supports this case via the old API, however this support will be removed in the future releases.
+New version fully supports this case via old API, however this support will be removed in the future releases.
 
 ### Move price scale from right to left or vice versa
 
 To do this, instead of
 
 ```javascript
-const chart = LightweightCharts.createChart(container);
+var chart = LightweightCharts.createChart(container);
 
-const mainSeries = chart.addLineSeries();
+var mainSeries = chart.addLineSeries();
 
 // ...
 
@@ -135,9 +135,9 @@ chart.applyOptions({
 use
 
 ```javascript
-const chart = LightweightCharts.createChart(container);
+var chart = LightweightCharts.createChart(container);
 
-const mainSeries = chart.addLineSeries();
+var mainSeries = chart.addLineSeries();
 
 // ...
 
@@ -155,4 +155,4 @@ mainSeries.applyOptions({
 });
 ```
 
-New version does not support this case via the old API, so, if you use it, you should migrate your code in order of keeping it working.
+New version does not support this case via old API, so, if you use it, you should migrate your code in order of keeping it working.
diff --git a/docs/constants.md b/docs/constants.md
index b3f85a166..56a81632a 100644
--- a/docs/constants.md
+++ b/docs/constants.md
@@ -75,8 +75,8 @@ It has the following values:
 
 It has the following values:
 
-- `TickMarkType.Year` - the tick mark represents the start of the year (e.g. it's the first tick mark in a year).
-- `TickMarkType.Month` - the tick mark represents the start of the month (e.g. it's the first tick mark in a month).
+- `TickMarkType.Year` - the tick mark represents start of the year (e.g. it's the first tick mark in a year).
+- `TickMarkType.Month` - the tick mark represents start of the month (e.g. it's the first tick mark in a month).
 - `TickMarkType.DayOfMonth` - the tick mark represents a day of the month.
 - `TickMarkType.Time` - the tick mark represents a time without seconds.
 - `TickMarkType.TimeWithSeconds` - the tick mark represents a full time format.
diff --git a/docs/customization.md b/docs/customization.md
index 979ebc02f..aa212b197 100644
--- a/docs/customization.md
+++ b/docs/customization.md
@@ -80,7 +80,7 @@ Changing the time format of the time scale labels is not available currently but
 ```javascript
 const chart = createChart(document.body, {
     localization: {
-        timeFormatter: (businessDayOrTimestamp) => {
+        timeFormatter: function(businessDayOrTimestamp) {
             // console.log(businessDayOrTimestamp);
 
             if (LightweightCharts.isBusinessDay(businessDayOrTimestamp)) {
@@ -100,7 +100,7 @@ const chart = createChart(document.body, {
 ```javascript
 const chart = createChart(document.body, {
     localization: {
-        priceFormatter: (price) => {
+        priceFormatter: function(price) {
             // add $ sign before price
 
             return '$' + price;
diff --git a/docs/price-scale.md b/docs/price-scale.md
index 6b7654a31..541329845 100644
--- a/docs/price-scale.md
+++ b/docs/price-scale.md
@@ -3,8 +3,8 @@
 Price Scale is an object that maps prices to coordinates and vice versa.
 The rules of converting depend on price scale mod, visible height of chart and visible part of data.
 
-Chart always has two predefined price scales: left and right, and an unlimited number of overlay scales.
-Left and right price scales could be visible, overlay price scales are always hidden, so the user cannot interact with them directly.
+Chart always has two predefined price scales: left and right, and unlimited number of overlay scales.
+Left and right price scales could be visible, overlay price scales are always hidden, so the user cannot interact them directly.
 
 ## Autoscale
 
@@ -14,27 +14,27 @@ Overlay price scales are always autoscaled.
 
 ## PriceScale ID
 
-Each price scale has a corresponding ID to refer to it via API. Left and right price scales have predefined IDs `left` and `right`.
+Each price scale has corresponsing ID to refer it via API. Left and right price scales have predefined IDs `left` and `right`.
 While creating a series, you could specify PriceScaleID.
-If this id refers to an already existing price scale, the new series will share the price scale with the already existing series.
-If the specified price scale does not exist, it will be implicitly created.
+If this id refers to already existing price scale, new series will share the price scale with already existing series.
+If specified price scale does not exist, it will be implicitly created.
 So to create two series on the same overlay price scale just specify the same `priceScaleId` for them.
-You could get the `id` of the scale with `PriceScaleApi.id` method.
+You could get `id` of the scale with `PriceScaleApi.id` method.
 
 ## Percentage scales
 
-Percentage mode of price scale allows relative comparison of series.
+Percentage mode of price scale allows relative comparing of series.
 All the serieses attached to the percentage scale are placed to have the first visible data item on the same point.
 Percentage scales are always autoscaled.
 
 ## Logarithmic scales
 
-The reason for having logarithmic scales is comparing relative change instead of absolute change.
-On a regular scale every candle with 100-points change has the same height.
-On a logarithmic scale every candle with 2% change has the same height.
-Logarithmic scale cannot be displayed as a percentage.
+The reason of having logarithmic scales is comparing relative change instead of absolute change.
+On regular scale every candle with 100-points change has the same height.
+On logarithmic scale every candle with 2% change has the same height.
+Logarithmic scale cannot be percentage.
 
 ## Equality of price scales
 
 Lightweight charts library does not guarantee to return the same instance of `PriceScaleApi` object while returning the same actual price scale.
-So you should never compare objects of `PriceScaleApi`, compare `PriceScaleApi.id()` values instead.
+So you should never compare objects of `PriceScaleApi`, comapre `PriceScaleApi.id()` values instead.
diff --git a/docs/series-basics.md b/docs/series-basics.md
index a9888b709..dd49d48da 100644
--- a/docs/series-basics.md
+++ b/docs/series-basics.md
@@ -57,7 +57,7 @@ const lineSeries = chart.addLineSeries({
 
 ### Binding to price scale
 
-When adding any series to a chart, you can specify if you want the target series to be attached to a certain price axis - left or right.
+When adding any series to a chart, you can specify if you want target series to be attached to a certain price axis - left or right.
 By default, series are attached to the right price axis.
 This means one can scale the series with price axis. Note that price axis visible range depends on series values.
 
@@ -67,8 +67,8 @@ const lineSeries = chart.addLineSeries({
 });
 ```
 
-In contrast, an overlay series just draws itself on a chart independent from the visible price axis.
-To create an overlay specify a unique id as a `priceScaleId` or just keep is as an empty string.
+In contrast, overlay series just draws itself on a chart independent from the visible price axis.
+To create overlay specify unique id as a `priceScaleId` or just keep is as empty string.
 
 ```javascript
 const lineSeries = chart.addLineSeries({
@@ -143,11 +143,11 @@ chart.applyOptions({
 
 ### Overriding autoscale
 
-By default, the chart scales data automatically based on visible data range. However, for some reasons one could require overriding this behavior.
+By default, the chart scales data automatically based on visible data range. However, for some reasons one could need overriding this behavior.
 There is an option called `autoscaleProvider` that allows overriding visible price range for series
 
 ```javascript
-const firstSeries = chart.addLineSeries({
+var firstSeries = chart.addLineSeries({
     autoscaleInfoProvider: () => {
         return {
             priceRange: {
@@ -164,7 +164,7 @@ So, you can just add a function that returns an object with `priceRange` field,
 You can also provide additional margins in pixels. Please be careful and never mix prices and pixels.
 
 ```javascript
-const firstSeries = chart.addLineSeries({
+var firstSeries = chart.addLineSeries({
     autoscaleInfoProvider: () => {
         return {
             priceRange: {
@@ -183,9 +183,9 @@ const firstSeries = chart.addLineSeries({
 Actually, `autoscaleInfoProvider` function has an argument `original` which is the default implementation, so you can call it and adjust the result:
 
 ```javascript
-const firstSeries = chart.addLineSeries({
+var firstSeries = chart.addLineSeries({
     autoscaleInfoProvider: (original) => {
-        const res = original();
+        var res = original();
         if (res.priceRange !== null) {
             res.priceRange.minValue -= 10;
             res.priceRange.maxValue += 10;
@@ -329,7 +329,7 @@ series.applyOptions({
     priceFormat: {
         type: 'custom',
         minMove: 0.02,
-        formatter: (price) => {
+        formatter: function(price) {
             return '$' + price.toFixed(2);
         },
     }
@@ -425,11 +425,11 @@ series.setMarkers([
     },
 ]);
 
-chart.subscribeCrosshairMove((param) => {
+chart.subscribeCrosshairMove(function(param) {
     console.log(param.hoveredMarkerId);
 });
 
-chart.subscribeClick((param) => {
+chart.subscribeClick(function(param) {
     console.log(param.hoveredMarkerId);
 });
 ```
@@ -493,10 +493,10 @@ The returned value is an object with the following properties:
 - `barsBefore` - a number of bars between the `from` index of the passed logical range and the first series' bar
 - `barsAfter` - a number of bars between the `to` index of the passed logical range and the last series' bar
 
-Positive value in the `barsBefore` field means that there are some bars before (out of logical range from the left) the `from` logical index in the series.
+Positive value in `barsBefore` field means that there are some bars before (out of logical range from the left) the `from` logical index in the series.
 Negative value means that the first series' bar is inside the passed logical range, and between the first series' bar and the `from` logical index are some bars.
 
-Positive value in the `barsAfter` field means that there are some bars after (out of logical range from the right) the `to` logical index in the series.
+Positive value in `barsAfter` field means that there are some bars after (out of logical range from the right) the `to` logical index in the series.
 Negative value means that the last series' bar is inside the passed logical range, and between the last series' bar and the `to` logical index are some bars.
 
 ```javascript
diff --git a/docs/time-scale.md b/docs/time-scale.md
index 1b3497c2e..9246e90fb 100644
--- a/docs/time-scale.md
+++ b/docs/time-scale.md
@@ -16,7 +16,7 @@ Time scale (or time axis) is a horizontal scale at the bottom of the chart that
 |`visible`|`boolean`|`true`|If true, the time scale is shown on a chart|
 |`timeVisible`|`boolean`|`false`|If true, the time is shown on the time scale and in the vertical crosshair label|
 |`secondsVisible`|`boolean`|`true`|If true, seconds are shown on the label of the crosshair vertical line in `hh:mm:ss` format on intraday intervals|
-|`tickMarkFormatter`|`(TimePoint, TickMarkType, locale) => string` &#124; `undefined`|`undefined`|Allows to override the tick marks formatter (see below)|
+|`tickMarkFormatter`|`(TimePoint, TickMarkType, locale) => string`|Default tick marks formatter|Allows to override the tick marks formatter (see below)|
 
 ### Tick marks formatter
 
@@ -25,12 +25,12 @@ Tick marks formatter can be used to customize tick marks labels on the time axis
 To customize it, you need to provide the `tickMarkFormatter` option. It's a function with the following declaration:
 
 ```typescript
-export type TickMarkFormatter = (time: UTCTimestamp | BusinessDay, tickMarkType: TickMarkType, locale: string) => string;
+export type TickMarkFormatter = (timePoint: TimePoint, tickMarkType: TickMarkType, locale: string) => string;
 ```
 
-Where `time` is [Time](./time.md) object, `type` is [TickMarkType](./constants.md#TickMarkType) enum and `locale` is the currently applied locale of the string type.
+Where `timePoint` is [Time](./time.md) object, `type` is [TickMarkType](./constants.md#TickMarkType) enum and `locale` is the currently applied locale of the string type.
 
-This function should return `time` as a string formatted according to `tickMarkType` type (year, month, etc) and `locale`.
+This function should return `timePoint` as a string formatted according to `tickMarkType` type (year, month, etc) and `locale`.
 
 Note that the returned string should be the shortest possible value and should have no more than 8 characters.
 Otherwise, the tick marks will overlap each other.
@@ -50,10 +50,9 @@ chart.applyOptions({
         visible: true,
         timeVisible: true,
         secondsVisible: false,
-        tickMarkFormatter: (time, tickMarkType, locale) => {
-            console.log(time, tickMarkType, locale);
-            const year = LightweightCharts.isBusinessDay(time) ? time.year : new Date(time * 1000).getUTCFullYear();
-            return String(year);
+        tickMarkFormatter: function(timePoint, tickMarkType, locale) {
+            console.log(timePoint, tickMarkType, locale);
+            return String(new Date(timePoint.timestamp * 1000).getUTCFullYear());
         },
     },
 });
@@ -147,7 +146,7 @@ chart.timeScale().fitContent();
 ### timeToCoordinate
 
 Converts a time to local `x` coordinate.
-The argument is [Time](./time.md) that needs to be converted into a coordinate.
+The argument is [Time](./time.md) that needs to be converted to a coordinate.
 
 Returns `x` coordinate of a bar with passed time or `null` if no bar found.
 
@@ -158,7 +157,7 @@ chart.timeScale().timeToCoordinate('1990-04-24');
 ### coordinateToTime
 
 Converts `x` coordinate to [Time](./time.md).
-The argument is the `x` coordinate that needs to be converted into a time.
+The argument is `x` coordinate that needs to be converted to a time.
 
 Returns [Time](./time.md) of a bar that is located on the passed coordinate or `null` if there are no bars on that coordinate.
 
@@ -248,9 +247,9 @@ Before that point all indexes are negative, starting from that point - positive.
 
 Indexes might have fractional parts, for instance 4.2, due to the time-scale being continuous rather than discrete.
 
-Integer part of the logical index means index of the fully visible bar (see image below).
+Integer part of logical index means index of the fully visible bar (see image below).
 Thus, if we have 5.2 as the last visible logical index (`to` field), that means that the last visible bar has index 5, but we also have partially visible (for 20%) 6th bar.
-Half (e.g. 1.5, 3.5, 10.5) means exactly a middle of the bar.
+Half (e.g. 1.5, 3.5, 10.5) means exactly middle of the bar.
 
 ![Logical range](./assets/logical-range.png "Logical range")
 
diff --git a/package.json b/package.json
index ff7e8e30e..33051f1df 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "private": true,
-  "version": "3.1.0",
+  "version": "3.0.0",
   "name": "lightweight-charts",
   "author": "TradingView, Inc.",
   "license": "Apache-2.0",
@@ -43,8 +43,7 @@
     "clean-publish": "~1.1.5",
     "cross-env": "~7.0.0",
     "dts-bundle-generator": "~4.3.0",
-    "eslint": "~7.2.0",
-    "eslint-plugin-markdown": "~2.0.0-alpha.0",
+    "eslint": "~7.1.0",
     "glob": "~7.1.6",
     "markdown-it": "~11.0.0",
     "markdown-it-anchor": "~5.3.0",
@@ -52,7 +51,7 @@
     "mocha": "~7.2.0",
     "npm-run-all": "~4.1.5",
     "rimraf": "~3.0.2",
-    "rollup": "~2.15.0",
+    "rollup": "~2.10.9",
     "rollup-plugin-node-resolve": "~5.2.0",
     "rollup-plugin-replace": "~2.2.0",
     "rollup-plugin-terser": "~6.1.0",
@@ -65,7 +64,7 @@
     "tslint-microsoft-contrib": "~6.2.0",
     "ttypescript": "~1.5.10",
     "typecov": "~0.2.1",
-    "typescript": "3.9.5",
+    "typescript": "3.9.3",
     "vrsource-tslint-rules": "6.0.0"
   },
   "scripts": {
@@ -77,7 +76,7 @@
     "tsc-watch": "npm run tsc -- --watch --preserveWatchOutput",
     "tsc-verify": "tsc -b tsconfig.composite.json",
     "lint": "npm-run-all -p lint:**",
-    "lint:eslint": "eslint --format=unix --ext .js,.md ./",
+    "lint:eslint": "eslint --format=unix --ext .js ./",
     "lint:tslint": "tslint --config tslint.json --project tsconfig.json",
     "lint:md": "./node_modules/.bin/markdownlint -i \"**/node_modules/**\" \"**/*.md\"",
     "check-markdown-links": "node scripts/check-markdown-links.js",
diff --git a/scripts/githooks/pre-commit/lint.js b/scripts/githooks/pre-commit/lint.js
index f276540c6..29f143920 100755
--- a/scripts/githooks/pre-commit/lint.js
+++ b/scripts/githooks/pre-commit/lint.js
@@ -68,8 +68,8 @@ function runTSLintForFiles(tsFiles) {
 	return runForFiles('node ./node_modules/tslint/bin/tslint --config tslint.json', tsFiles);
 }
 
-function runESLintForFiles(files) {
-	return runForFiles('node ./node_modules/eslint/bin/eslint --quiet --format=unix', files);
+function runESLintForFiles(jsFiles) {
+	return runForFiles('node ./node_modules/eslint/bin/eslint --quiet --format=unix', jsFiles);
 }
 
 function runMarkdownLintForFiles(mdFiles) {
@@ -100,8 +100,6 @@ function lintFiles(files) {
 	// markdown
 	const mdFiles = filterByExt(files, '.md');
 	if (mdFiles.length !== 0) {
-		// yeah, eslint might check code inside markdown files
-		hasErrors = runESLintForFiles(mdFiles) || hasErrors;
 		hasErrors = runMarkdownLintForFiles(mdFiles) || hasErrors;
 		hasErrors = run('node scripts/check-markdown-links.js') || hasErrors;
 	}
diff --git a/src/api/chart-api.ts b/src/api/chart-api.ts
index 78243063d..8f8964271 100644
--- a/src/api/chart-api.ts
+++ b/src/api/chart-api.ts
@@ -44,7 +44,7 @@ import {
 	seriesOptionsDefaults,
 } from './options/series-options-defaults';
 import { PriceScaleApi } from './price-scale-api';
-import { migrateOptions, SeriesApi } from './series-api';
+import { SeriesApi } from './series-api';
 import { TimeScaleApi } from './time-scale-api';
 
 function patchPriceFormat(priceFormat?: DeepPartial<PriceFormat>): void {
@@ -196,7 +196,6 @@ export class ChartApi implements IChartApi, IPriceScaleApiProvider, DataUpdatesC
 	}
 
 	public addAreaSeries(options: AreaSeriesPartialOptions = {}): ISeriesApi<'Area'> {
-		options = migrateOptions(options);
 		patchPriceFormat(options.priceFormat);
 
 		const strictOptions = merge(clone(seriesOptionsDefaults), areaStyleDefaults, options) as AreaSeriesOptions;
@@ -210,7 +209,6 @@ export class ChartApi implements IChartApi, IPriceScaleApiProvider, DataUpdatesC
 	}
 
 	public addBarSeries(options: BarSeriesPartialOptions = {}): ISeriesApi<'Bar'> {
-		options = migrateOptions(options);
 		patchPriceFormat(options.priceFormat);
 
 		const strictOptions = merge(clone(seriesOptionsDefaults), barStyleDefaults, options) as BarSeriesOptions;
@@ -224,7 +222,6 @@ export class ChartApi implements IChartApi, IPriceScaleApiProvider, DataUpdatesC
 	}
 
 	public addCandlestickSeries(options: CandlestickSeriesPartialOptions = {}): ISeriesApi<'Candlestick'> {
-		options = migrateOptions(options);
 		fillUpDownCandlesticksColors(options);
 		patchPriceFormat(options.priceFormat);
 
@@ -239,7 +236,6 @@ export class ChartApi implements IChartApi, IPriceScaleApiProvider, DataUpdatesC
 	}
 
 	public addHistogramSeries(options: HistogramSeriesPartialOptions = {}): ISeriesApi<'Histogram'> {
-		options = migrateOptions(options);
 		patchPriceFormat(options.priceFormat);
 
 		const strictOptions = merge(clone(seriesOptionsDefaults), histogramStyleDefaults, options) as HistogramSeriesOptions;
@@ -253,7 +249,6 @@ export class ChartApi implements IChartApi, IPriceScaleApiProvider, DataUpdatesC
 	}
 
 	public addLineSeries(options: LineSeriesPartialOptions = {}): ISeriesApi<'Line'> {
-		options = migrateOptions(options);
 		patchPriceFormat(options.priceFormat);
 
 		const strictOptions = merge(clone(seriesOptionsDefaults), lineStyleDefaults, options) as LineSeriesOptions;
diff --git a/src/api/options/time-scale-options-defaults.ts b/src/api/options/time-scale-options-defaults.ts
index 230753abd..2d35891b6 100644
--- a/src/api/options/time-scale-options-defaults.ts
+++ b/src/api/options/time-scale-options-defaults.ts
@@ -1,3 +1,4 @@
+import { defaultTickMarkFormatter } from '../../model/default-tick-mark-formatter';
 import { TimeScaleOptions } from '../../model/time-scale';
 
 export const timeScaleOptionsDefaults: TimeScaleOptions = {
@@ -11,4 +12,5 @@ export const timeScaleOptionsDefaults: TimeScaleOptions = {
 	visible: true,
 	timeVisible: false,
 	secondsVisible: true,
+	tickMarkFormatter: defaultTickMarkFormatter,
 };
diff --git a/src/api/series-api.ts b/src/api/series-api.ts
index 1665ff38c..df3dc8259 100644
--- a/src/api/series-api.ts
+++ b/src/api/series-api.ts
@@ -26,7 +26,7 @@ import { BarsInfo, IPriceFormatter, ISeriesApi } from './iseries-api';
 import { priceLineOptionsDefaults } from './options/price-line-options-defaults';
 import { PriceLine } from './price-line-api';
 
-export function migrateOptions<TSeriesType extends SeriesType>(options: SeriesPartialOptionsMap[TSeriesType]): SeriesPartialOptionsInternal<TSeriesType> {
+function migrateOptions<TSeriesType extends SeriesType>(options: SeriesPartialOptionsMap[TSeriesType]): SeriesPartialOptionsInternal<TSeriesType> {
 	// tslint:disable-next-line:deprecation
 	const { overlay, ...res } = options;
 	if (overlay) {
diff --git a/src/model/text-width-cache.ts b/src/model/text-width-cache.ts
index b663f1825..143a2ce8d 100644
--- a/src/model/text-width-cache.ts
+++ b/src/model/text-width-cache.ts
@@ -1,52 +1,71 @@
+export type CanvasCtxLike = Pick<CanvasRenderingContext2D, 'measureText'>;
+
 const defaultReplacementRe = /[2-9]/g;
 
 export class TextWidthCache {
-	private readonly _maxSize: number;
-	private _actualSize: number = 0;
-	private _usageTick: number = 1;
-	private _oldestTick: number = 1;
-	private _tick2Labels: Record<number, string> = {};
-	private _cache: Record<string, { width: number; tick: number }> = {};
+	private _cache: Map<string, number> = new Map();
+	/** A "cyclic buffer" of cache keys */
+	private _keys: (string | undefined)[];
+	/** Current index in the "cyclic buffer" */
+	private _keysIndex: number = 0;
 
 	public constructor(size: number = 50) {
-		this._maxSize = size;
+		// A trick to keep array PACKED_ELEMENTS
+		this._keys = Array.from(new Array(size));
 	}
 
 	public reset(): void {
-		this._actualSize = 0;
-		this._cache = {};
-		this._usageTick = 1;
-		this._oldestTick = 1;
-		this._tick2Labels = {};
+		this._cache.clear();
+		this._keys.fill(undefined);
+		// We don't care where exactly the _keysIndex points,
+		// so there's no point in resetting it
 	}
 
-	public measureText(ctx: CanvasRenderingContext2D, text: string, optimizationReplacementRe?: RegExp): number {
+	public measureText(ctx: CanvasCtxLike, text: string, optimizationReplacementRe?: RegExp): number {
 		const re = optimizationReplacementRe || defaultReplacementRe;
 		const cacheString = String(text).replace(re, '0');
 
-		if (this._cache[cacheString]) {
-			return this._cache[cacheString].width;
-		}
+		let width = this._cache.get(cacheString);
 
-		if (this._actualSize === this._maxSize) {
-			const oldestValue = this._tick2Labels[this._oldestTick];
-			delete this._tick2Labels[this._oldestTick];
-			delete this._cache[oldestValue];
-			this._oldestTick++;
-			this._actualSize--;
-		}
+		if (width === undefined) {
+			width = ctx.measureText(cacheString).width;
+
+			if (width === 0 && text.length !== 0) {
+				// measureText can return 0 in FF depending on a canvas size, don't cache it
+				return 0;
+			}
+
+			// A cyclic buffer is used to keep track of the cache keys and to delete
+			// the oldest one before a new one is inserted.
+			// ├──────┬──────┬──────┬──────┤
+			// │ foo  │ bar  │      │      │
+			// ├──────┴──────┴──────┴──────┤
+			//                 ↑ index
+
+			// Eventually, the index reach the end of an array and roll-over to 0.
+			// ├──────┬──────┬──────┬──────┤
+			// │ foo  │ bar  │ baz  │ quux │
+			// ├──────┴──────┴──────┴──────┤
+			//   ↑ index = 0
+
+			// After that the oldest value will be overwritten.
+			// ├──────┬──────┬──────┬──────┤
+			// │ WOOT │ bar  │ baz  │ quux │
+			// ├──────┴──────┴──────┴──────┤
+			//          ↑ index = 1
 
-		const width = ctx.measureText(cacheString).width;
+			const oldestKey = this._keys[this._keysIndex];
+			if (oldestKey !== undefined) {
+				this._cache.delete(oldestKey);
+			}
+			// Set a newest key in place of the just deleted one
+			this._keys[this._keysIndex] = cacheString;
+			// Advance the index so it always points the oldest value
+			this._keysIndex = (this._keysIndex + 1) % this._keys.length;
 
-		if (width === 0 && !!text.length) {
-			// measureText can return 0 in FF depending on a canvas size, don't cache it
-			return 0;
+			this._cache.set(cacheString, width);
 		}
 
-		this._cache[cacheString] = { width: width, tick: this._usageTick };
-		this._tick2Labels[this._usageTick] = cacheString;
-		this._actualSize++;
-		this._usageTick++;
 		return width;
 	}
 }
diff --git a/src/model/time-scale.ts b/src/model/time-scale.ts
index 2f44fa118..4d4025d04 100644
--- a/src/model/time-scale.ts
+++ b/src/model/time-scale.ts
@@ -9,12 +9,11 @@ import { DeepPartial, isInteger, merge } from '../helpers/strict-type-checks';
 
 import { ChartModel } from './chart-model';
 import { Coordinate } from './coordinate';
-import { defaultTickMarkFormatter } from './default-tick-mark-formatter';
 import { FormattedLabelsCache } from './formatted-labels-cache';
 import { LocalizationOptions } from './localization-options';
 import { areRangesEqual, RangeImpl } from './range-impl';
 import { TickMarks } from './tick-marks';
-import { BusinessDay, Logical, LogicalRange, SeriesItemsIndexesRange, TickMark, TimedValue, TimePoint, TimePointIndex, TimePointsRange, UTCTimestamp } from './time-data';
+import { Logical, LogicalRange, SeriesItemsIndexesRange, TickMark, TimedValue, TimePoint, TimePointIndex, TimePointsRange } from './time-data';
 import { TimePoints } from './time-points';
 import { TimeScaleVisibleRange } from './time-scale-visible-range';
 
@@ -54,7 +53,7 @@ export const enum TickMarkType {
 	TimeWithSeconds,
 }
 
-export type TickMarkFormatter = (time: UTCTimestamp | BusinessDay, tickMarkType: TickMarkType, locale: string) => string;
+export type TickMarkFormatter = (timePoint: TimePoint, tickMarkType: TickMarkType, locale: string) => string;
 
 export interface TimeScaleOptions {
 	rightOffset: number;
@@ -67,7 +66,7 @@ export interface TimeScaleOptions {
 	visible: boolean;
 	timeVisible: boolean;
 	secondsVisible: boolean;
-	tickMarkFormatter?: TickMarkFormatter;
+	tickMarkFormatter: TickMarkFormatter;
 }
 
 export class TimeScale {
@@ -728,18 +727,7 @@ export class TimeScale {
 			tickMarkType = TickMarkType.Year;
 		}
 
-		if (this._options.tickMarkFormatter !== undefined) {
-			// this is temporary solution to make more consistency API
-			// it looks like that all time types in API should have the same form
-			// but for know defaultTickMarkFormatter is on model level and can't determine whether passed time is business day or UTCTimestamp
-			// because type guards are declared on API level
-			// in other hand, type guards couldn't be declared on model level so far
-			// because they are know about string representation of business day ¯\_(ツ)_/¯
-			// let's fix in for all cases for the whole API
-			return this._options.tickMarkFormatter(timePoint.businessDay ?? timePoint.timestamp, tickMarkType, this._localizationOptions.locale);
-		}
-
-		return defaultTickMarkFormatter(timePoint, tickMarkType, this._localizationOptions.locale);
+		return this._options.tickMarkFormatter(timePoint, tickMarkType, this._localizationOptions.locale);
 	}
 
 	private _setVisibleRange(newVisibleRange: TimeScaleVisibleRange): void {
diff --git a/src/views/pane/pane-price-axis-view.ts b/src/views/pane/pane-price-axis-view.ts
index e9e174010..4babe386a 100644
--- a/src/views/pane/pane-price-axis-view.ts
+++ b/src/views/pane/pane-price-axis-view.ts
@@ -66,14 +66,14 @@ export class PanePriceAxisView implements IPaneView {
 			return null;
 		}
 
-		// this price scale will be used to find label placement only (left, right, none)
-		const priceScale = pane.isOverlay(this._dataSource) ? pane.defaultPriceScale() : this._dataSource.priceScale();
+		const priceScale = this._dataSource.priceScale();
 		if (priceScale === null) {
 			return null;
 		}
 
 		const position = pane.priceScalePosition(priceScale);
 		if (position === 'overlay') {
+			// both source and main source are overlays
 			return null;
 		}
 


Test patch:
diff --git a/tests/e2e/graphics/test-cases/.eslintrc.js b/tests/e2e/graphics/test-cases/.eslintrc.js
index e3465446c..24863e508 100644
--- a/tests/e2e/graphics/test-cases/.eslintrc.js
+++ b/tests/e2e/graphics/test-cases/.eslintrc.js
@@ -5,7 +5,7 @@ module.exports = {
 		node: false,
 	},
 	rules: {
-		'no-unused-vars': ['error', { varsIgnorePattern: 'runTestCase', args: 'none' }],
+		'no-var': 'off',
 	},
 	globals: {
 		LightweightCharts: false,
diff --git a/tests/e2e/graphics/test-cases/add-series-after-time.js b/tests/e2e/graphics/test-cases/add-series-after-time.js
index 5df3fdcf7..af553cf6e 100644
--- a/tests/e2e/graphics/test-cases/add-series-after-time.js
+++ b/tests/e2e/graphics/test-cases/add-series-after-time.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 1000; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 1000; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,12 +12,13 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	return new Promise((resolve) => {
 		setTimeout(() => {
-			const mainSeries = chart.addLineSeries();
+			var mainSeries = chart.addLineSeries();
 			mainSeries.setData(generateData());
 
 			resolve();
diff --git a/tests/e2e/graphics/test-cases/api/price-scale-width.js b/tests/e2e/graphics/test-cases/api/price-scale-width.js
index 659d2f2c0..5cd14e0f8 100644
--- a/tests/e2e/graphics/test-cases/api/price-scale-width.js
+++ b/tests/e2e/graphics/test-cases/api/price-scale-width.js
@@ -1,5 +1,6 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		rightPriceScale: {
 			visible: true,
 		},
@@ -8,7 +9,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const series = chart.addLineSeries({ priceScaleId: 'overlay-scale' });
+	var series = chart.addLineSeries({ priceScaleId: 'overlay-scale' });
 	series.setData([
 		{ time: '1990-04-24', value: 0 },
 		{ time: '1990-04-25', value: 1 },
@@ -18,9 +19,9 @@ function runTestCase(container) {
 
 	return new Promise((resolve) => {
 		setTimeout(() => {
-			const leftPriceScale = chart.priceScale('left');
-			const rightPriceScale = chart.priceScale('right');
-			const overlayScale = chart.priceScale('overlay-scale');
+			var leftPriceScale = chart.priceScale('left');
+			var rightPriceScale = chart.priceScale('right');
+			var overlayScale = chart.priceScale('overlay-scale');
 
 			console.assert(leftPriceScale.width() === 0, 'Width of invisible price axis should be 0');
 			console.assert(rightPriceScale.width() > 0, 'Width of visible price axis should be greater 0');
diff --git a/tests/e2e/graphics/test-cases/api/time-scale-coordinate-to-time.js b/tests/e2e/graphics/test-cases/api/time-scale-coordinate-to-time.js
index fc4d97e96..2de5d6f57 100644
--- a/tests/e2e/graphics/test-cases/api/time-scale-coordinate-to-time.js
+++ b/tests/e2e/graphics/test-cases/api/time-scale-coordinate-to-time.js
@@ -1,6 +1,7 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const width = 400;
-	const chart = LightweightCharts.createChart(container, {
+	var width = 400;
+	var chart = LightweightCharts.createChart(container, {
 		width: width,
 		height: 200,
 		rightPriceScale: {
@@ -11,9 +12,9 @@ function runTestCase(container) {
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
-	const data = [
+	var data = [
 		{ time: '1990-04-24', value: 0 },
 		{ time: '1990-04-25', value: 1 },
 		{ time: '1990-04-26', value: 2 },
@@ -22,15 +23,15 @@ function runTestCase(container) {
 
 	series.setData(data);
 
-	const timeScale = chart.timeScale();
+	var timeScale = chart.timeScale();
 	timeScale.setVisibleLogicalRange({ from: 0.5, to: (data.length - 1) - 0.5 });
 
 	return new Promise((resolve) => {
 		setTimeout(() => {
-			const timeAtZeroCoordinate = timeScale.coordinateToTime(0);
+			var timeAtZeroCoordinate = timeScale.coordinateToTime(0);
 			console.assert(timeAtZeroCoordinate === data[0].time, `Time at zero coordinate must be the first bar time, got=${timeAtZeroCoordinate}`);
 
-			const timeAtWidthCoordinate = timeScale.coordinateToTime(width);
+			var timeAtWidthCoordinate = timeScale.coordinateToTime(width);
 			console.assert(timeAtWidthCoordinate === data[data.length - 1].time, `Time at ${width} coordinate must be the last bar time, got=${timeAtWidthCoordinate}`);
 
 			console.assert(timeScale.coordinateToTime(-100) === null, 'Coordinate of time out of data from left should be null');
diff --git a/tests/e2e/graphics/test-cases/api/time-scale-time-to-coordinate.js b/tests/e2e/graphics/test-cases/api/time-scale-time-to-coordinate.js
index 24eed3229..907f76ee7 100644
--- a/tests/e2e/graphics/test-cases/api/time-scale-time-to-coordinate.js
+++ b/tests/e2e/graphics/test-cases/api/time-scale-time-to-coordinate.js
@@ -2,9 +2,10 @@ function inRange(from, value, to) {
 	return !isNaN(value) && from < value && value < to;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const width = 400;
-	const chart = LightweightCharts.createChart(container, {
+	var width = 400;
+	var chart = LightweightCharts.createChart(container, {
 		width: width,
 		height: 200,
 		rightPriceScale: {
@@ -15,9 +16,9 @@ function runTestCase(container) {
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
-	const data = [
+	var data = [
 		{ time: '1990-04-24', value: 0 },
 		{ time: '1990-04-25', value: 1 },
 		{ time: '1990-04-26', value: 2 },
@@ -26,15 +27,15 @@ function runTestCase(container) {
 
 	series.setData(data);
 
-	const timeScale = chart.timeScale();
+	var timeScale = chart.timeScale();
 	timeScale.setVisibleLogicalRange({ from: 0.5, to: (data.length - 1) - 0.5 });
 
 	return new Promise((resolve) => {
 		setTimeout(() => {
-			const firstBarCoordinate = timeScale.timeToCoordinate(data[0].time);
+			var firstBarCoordinate = timeScale.timeToCoordinate(data[0].time);
 			console.assert(inRange(-2, firstBarCoordinate, 2), `First bar coordinate must be around 0, got=${firstBarCoordinate}`);
 
-			const lastBarCoordinate = timeScale.timeToCoordinate(data[data.length - 1].time);
+			var lastBarCoordinate = timeScale.timeToCoordinate(data[data.length - 1].time);
 			console.assert(inRange(width - 2, lastBarCoordinate, width + 2), `Last bar coordinate must be around ${width}, got=${lastBarCoordinate}`);
 
 			console.assert(timeScale.timeToCoordinate('1990-04-23') === null, 'Coordinate of time out of data from left should be null');
diff --git a/tests/e2e/graphics/test-cases/applying-options/apply-do-not-draw-price-ticks.js b/tests/e2e/graphics/test-cases/applying-options/apply-do-not-draw-price-ticks.js
index aa3ba0fac..213e32f22 100644
--- a/tests/e2e/graphics/test-cases/applying-options/apply-do-not-draw-price-ticks.js
+++ b/tests/e2e/graphics/test-cases/applying-options/apply-do-not-draw-price-ticks.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			drawTicks: false,
 		},
 	});
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/applying-options/empty-time-scale-options.js b/tests/e2e/graphics/test-cases/applying-options/empty-time-scale-options.js
index b77a66ded..d903001d2 100644
--- a/tests/e2e/graphics/test-cases/applying-options/empty-time-scale-options.js
+++ b/tests/e2e/graphics/test-cases/applying-options/empty-time-scale-options.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,10 +22,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/applying-options/fix-left-edge.js b/tests/e2e/graphics/test-cases/applying-options/fix-left-edge.js
index 93efb6b2b..1303070b7 100644
--- a/tests/e2e/graphics/test-cases/applying-options/fix-left-edge.js
+++ b/tests/e2e/graphics/test-cases/applying-options/fix-left-edge.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 20; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 20; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 	mainSeries.setData(generateData());
 
 	chart.timeScale().applyOptions({ fixLeftEdge: true });
diff --git a/tests/e2e/graphics/test-cases/applying-options/move-price-scale.js b/tests/e2e/graphics/test-cases/applying-options/move-price-scale.js
index 647cbf96d..e2a2b7b6d 100644
--- a/tests/e2e/graphics/test-cases/applying-options/move-price-scale.js
+++ b/tests/e2e/graphics/test-cases/applying-options/move-price-scale.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			position: 'right',
 		},
 	});
 
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 	});
diff --git a/tests/e2e/graphics/test-cases/applying-options/move-series-from-right-to-left.js b/tests/e2e/graphics/test-cases/applying-options/move-series-from-right-to-left.js
index 9fe1ed8a9..ec1187994 100644
--- a/tests/e2e/graphics/test-cases/applying-options/move-series-from-right-to-left.js
+++ b/tests/e2e/graphics/test-cases/applying-options/move-series-from-right-to-left.js
@@ -1,8 +1,8 @@
 function generateData(offset) {
 	offset = offset || 0;
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i + offset,
@@ -13,8 +13,9 @@ function generateData(offset) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		leftPriceScale: {
 			visible: true,
 		},
@@ -23,7 +24,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		priceScaleId: 'right',
 	});
 
diff --git a/tests/e2e/graphics/test-cases/applying-options/move-series-to-overlay.js b/tests/e2e/graphics/test-cases/applying-options/move-series-to-overlay.js
index 16a70e306..c0580a743 100644
--- a/tests/e2e/graphics/test-cases/applying-options/move-series-to-overlay.js
+++ b/tests/e2e/graphics/test-cases/applying-options/move-series-to-overlay.js
@@ -1,8 +1,8 @@
 function generateData(offset) {
 	offset = offset || 0;
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i + offset,
@@ -13,17 +13,18 @@ function generateData(offset) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 	});
 
 	firstSeries.setData(generateData());
 
-	const secondsSeries = chart.addLineSeries({
+	var secondsSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#0000ff',
 	});
diff --git a/tests/e2e/graphics/test-cases/applying-options/scale-margins-for-overlay-series.js b/tests/e2e/graphics/test-cases/applying-options/scale-margins-for-overlay-series.js
index b0785ead8..41693cb64 100644
--- a/tests/e2e/graphics/test-cases/applying-options/scale-margins-for-overlay-series.js
+++ b/tests/e2e/graphics/test-cases/applying-options/scale-margins-for-overlay-series.js
@@ -1,7 +1,7 @@
 function generateData(valueOffset) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i + valueOffset,
@@ -13,13 +13,14 @@ function generateData(valueOffset) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		color: 'blue',
 	});
-	const secondSeries = chart.addLineSeries({
+	var secondSeries = chart.addLineSeries({
 		overlay: true,
 		color: 'green',
 		scaleMargins: {
@@ -28,7 +29,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const thirdSeries = chart.addLineSeries({
+	var thirdSeries = chart.addLineSeries({
 		overlay: true,
 	});
 
diff --git a/tests/e2e/graphics/test-cases/applying-options/series-title.js b/tests/e2e/graphics/test-cases/applying-options/series-title.js
index 1701e3ec1..78da588f3 100644
--- a/tests/e2e/graphics/test-cases/applying-options/series-title.js
+++ b/tests/e2e/graphics/test-cases/applying-options/series-title.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,10 +13,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		title: 'Initial title',
 	});
 
diff --git a/tests/e2e/graphics/test-cases/applying-options/update-chart-width.js b/tests/e2e/graphics/test-cases/applying-options/update-chart-width.js
index bd926599e..255b06e5f 100644
--- a/tests/e2e/graphics/test-cases/applying-options/update-chart-width.js
+++ b/tests/e2e/graphics/test-cases/applying-options/update-chart-width.js
@@ -1,6 +1,6 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,9 +22,10 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const box = container.getBoundingClientRect();
-	const chart = LightweightCharts.createChart(container, {
+	var box = container.getBoundingClientRect();
+	var chart = LightweightCharts.createChart(container, {
 		width: 2000,
 		height: box.height,
 		timeScale: {
@@ -33,7 +34,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/correct-price-range-in-autoscale.js b/tests/e2e/graphics/test-cases/correct-price-range-in-autoscale.js
index f99ab8ad0..f814b24e8 100644
--- a/tests/e2e/graphics/test-cases/correct-price-range-in-autoscale.js
+++ b/tests/e2e/graphics/test-cases/correct-price-range-in-autoscale.js
@@ -1,8 +1,8 @@
 function generateData(valueOffset, daysStep) {
-	const res = [];
-	const endDate = new Date(Date.UTC(2020, 0, 1, 0, 0, 0, 0));
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; time.getTime() < endDate.getTime(); ++i) {
+	var res = [];
+	var endDate = new Date(Date.UTC(2020, 0, 1, 0, 0, 0, 0));
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; time.getTime() < endDate.getTime(); ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i + valueOffset,
@@ -14,11 +14,12 @@ function generateData(valueOffset, daysStep) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const firstSeries = chart.addLineSeries();
-	const secondSeries = chart.addLineSeries();
+	var firstSeries = chart.addLineSeries();
+	var secondSeries = chart.addLineSeries();
 
 	firstSeries.setData(generateData(0, 3));
 	secondSeries.setData(generateData(20, 5));
diff --git a/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/indexed-to-100-scale.js b/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/indexed-to-100-scale.js
index 87e2841ab..0b556c40c 100644
--- a/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/indexed-to-100-scale.js
+++ b/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/indexed-to-100-scale.js
@@ -1,9 +1,9 @@
 function generateData() {
-	const res = [];
+	var res = [];
 
-	const endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
-	const time = new Date(new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)));
-	for (let i = 0; time.getTime() < endDate.getTime(); ++i) {
+	var endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
+	var time = new Date(new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)));
+	for (var i = 0; time.getTime() < endDate.getTime(); ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: 10,
@@ -15,14 +15,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.IndexedTo100,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		priceFormat: {
 			minMove: 10,
 		},
diff --git a/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/normal-scale.js b/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/normal-scale.js
index 802a8c815..addf76ad6 100644
--- a/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/normal-scale.js
+++ b/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/normal-scale.js
@@ -1,9 +1,9 @@
 function generateData() {
-	const res = [];
+	var res = [];
 
-	const endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
-	const time = new Date(new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)));
-	for (let i = 0; time.getTime() < endDate.getTime(); ++i) {
+	var endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
+	var time = new Date(new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)));
+	for (var i = 0; time.getTime() < endDate.getTime(); ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: 10,
@@ -15,14 +15,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Normal,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		priceFormat: {
 			minMove: 10,
 		},
diff --git a/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/percentage-scale.js b/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/percentage-scale.js
index 2ed0b77ee..29c79e50e 100644
--- a/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/percentage-scale.js
+++ b/tests/e2e/graphics/test-cases/degenerative-horizontal-series-with-integer-min-tick/percentage-scale.js
@@ -1,9 +1,9 @@
 function generateData() {
-	const res = [];
+	var res = [];
 
-	const endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
-	const time = new Date(new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)));
-	for (let i = 0; time.getTime() < endDate.getTime(); ++i) {
+	var endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
+	var time = new Date(new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0)));
+	for (var i = 0; time.getTime() < endDate.getTime(); ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: 10,
@@ -15,14 +15,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Percentage,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		priceFormat: {
 			minMove: 10,
 		},
diff --git a/tests/e2e/graphics/test-cases/fit-content-with-few-data.js b/tests/e2e/graphics/test-cases/fit-content-with-few-data.js
index 744b7fc45..12ddfcdc4 100644
--- a/tests/e2e/graphics/test-cases/fit-content-with-few-data.js
+++ b/tests/e2e/graphics/test-cases/fit-content-with-few-data.js
@@ -1,7 +1,7 @@
 function generateData(valueOffset, count) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < count; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < count; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i + valueOffset,
@@ -13,10 +13,11 @@ function generateData(valueOffset, count) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
 	series.setData(generateData(0, 10));
 
diff --git a/tests/e2e/graphics/test-cases/incorrect-autoscale-when-prices-are-small.js b/tests/e2e/graphics/test-cases/incorrect-autoscale-when-prices-are-small.js
index c8991f8f5..c1ae4dfcb 100644
--- a/tests/e2e/graphics/test-cases/incorrect-autoscale-when-prices-are-small.js
+++ b/tests/e2e/graphics/test-cases/incorrect-autoscale-when-prices-are-small.js
@@ -1,11 +1,11 @@
-const startDate = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-const endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
+var startDate = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+var endDate = new Date(Date.UTC(2019, 0, 1, 0, 0, 0, 0));
 
 function generateData() {
-	const res = [];
+	var res = [];
 
-	const time = new Date(startDate);
-	for (let i = 0; time.getTime() < endDate.getTime(); ++i) {
+	var time = new Date(startDate);
+	for (var i = 0; time.getTime() < endDate.getTime(); ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i / 1000 + 0.6,
@@ -17,11 +17,12 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const firstSeries = chart.addLineSeries();
-	const secondSeries = chart.addLineSeries();
+	var firstSeries = chart.addLineSeries();
+	var secondSeries = chart.addLineSeries();
 
 	firstSeries.setData(generateData());
 	secondSeries.setData([
diff --git a/tests/e2e/graphics/test-cases/initial-options/base-line-style.js b/tests/e2e/graphics/test-cases/initial-options/base-line-style.js
index b49806913..404cc171a 100644
--- a/tests/e2e/graphics/test-cases/initial-options/base-line-style.js
+++ b/tests/e2e/graphics/test-cases/initial-options/base-line-style.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Percentage,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		baseLineVisible: true,
 		baseLineWidth: 3,
 		baseLineColor: '#1215BE',
diff --git a/tests/e2e/graphics/test-cases/initial-options/chart-width-and-height.js b/tests/e2e/graphics/test-cases/initial-options/chart-width-and-height.js
index 17fef0592..8ca6fb184 100644
--- a/tests/e2e/graphics/test-cases/initial-options/chart-width-and-height.js
+++ b/tests/e2e/graphics/test-cases/initial-options/chart-width-and-height.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,6 +13,7 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
 	const configs = [{}, { width: 500 }, { height: 100 }, { width: 500, height: 100 }];
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/crosshair-label-color.js b/tests/e2e/graphics/test-cases/initial-options/crosshair-label-color.js
index 40db51d95..c40fa5a89 100644
--- a/tests/e2e/graphics/test-cases/initial-options/crosshair-label-color.js
+++ b/tests/e2e/graphics/test-cases/initial-options/crosshair-label-color.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,8 +12,9 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		crosshair: {
 			vertLine: {
 				labelBackgroundColor: '#ffffff',
@@ -24,7 +25,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/crosshair.js b/tests/e2e/graphics/test-cases/initial-options/crosshair.js
index 36ad2bf92..0abbbb4f4 100644
--- a/tests/e2e/graphics/test-cases/initial-options/crosshair.js
+++ b/tests/e2e/graphics/test-cases/initial-options/crosshair.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,8 +12,9 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		crosshair: {
 			vertLine: {
 				color: '#ff0000',
@@ -28,7 +29,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/custom-date-format.js b/tests/e2e/graphics/test-cases/initial-options/custom-date-format.js
index 60a98a090..31295ac8b 100644
--- a/tests/e2e/graphics/test-cases/initial-options/custom-date-format.js
+++ b/tests/e2e/graphics/test-cases/initial-options/custom-date-format.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		localization: {
 			dateFormat: 'Year: yy (MM-yyyy)',
 		},
 	});
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/custom-price-format.js b/tests/e2e/graphics/test-cases/initial-options/custom-price-format.js
index ef3407a39..eed087393 100644
--- a/tests/e2e/graphics/test-cases/initial-options/custom-price-format.js
+++ b/tests/e2e/graphics/test-cases/initial-options/custom-price-format.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,20 +12,23 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const areaSeries = chart.addAreaSeries({
+	var areaSeries = chart.addAreaSeries({
 		priceFormat: {
 			type: 'custom',
 			minMove: 0.01,
-			formatter: (price) => '\u0024' + price.toFixed(2),
+			formatter: function(price) {
+				return '\u0024' + price.toFixed(2);
+			},
 		},
 	});
 
 	areaSeries.setData(generateData());
 
-	const lineSeries = chart.addLineSeries();
+	var lineSeries = chart.addLineSeries();
 
 	lineSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/date-format.js b/tests/e2e/graphics/test-cases/initial-options/date-format.js
index 11f86a0f2..5af603de3 100644
--- a/tests/e2e/graphics/test-cases/initial-options/date-format.js
+++ b/tests/e2e/graphics/test-cases/initial-options/date-format.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		localization: {
 			dateFormat: 'MMM dd, yyyy',
 		},
 	});
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/do-not-draw-price-ticks.js b/tests/e2e/graphics/test-cases/initial-options/do-not-draw-price-ticks.js
index 354ce30ca..a76c04d97 100644
--- a/tests/e2e/graphics/test-cases/initial-options/do-not-draw-price-ticks.js
+++ b/tests/e2e/graphics/test-cases/initial-options/do-not-draw-price-ticks.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			drawTicks: false,
 		},
 	});
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/fat-bars.js b/tests/e2e/graphics/test-cases/initial-options/fat-bars.js
index 272515836..19479f1fe 100644
--- a/tests/e2e/graphics/test-cases/initial-options/fat-bars.js
+++ b/tests/e2e/graphics/test-cases/initial-options/fat-bars.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,14 +22,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			barSpacing: 20,
 		},
 	});
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		thinBars: false,
 	});
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/fix-left-edge-and-update-data.js b/tests/e2e/graphics/test-cases/initial-options/fix-left-edge-and-update-data.js
index b1dd57a2b..b26eaa1b1 100644
--- a/tests/e2e/graphics/test-cases/initial-options/fix-left-edge-and-update-data.js
+++ b/tests/e2e/graphics/test-cases/initial-options/fix-left-edge-and-update-data.js
@@ -1,5 +1,6 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			fixLeftEdge: true,
 		},
diff --git a/tests/e2e/graphics/test-cases/initial-options/fix-left-edge.js b/tests/e2e/graphics/test-cases/initial-options/fix-left-edge.js
index fd0728077..056a905ea 100644
--- a/tests/e2e/graphics/test-cases/initial-options/fix-left-edge.js
+++ b/tests/e2e/graphics/test-cases/initial-options/fix-left-edge.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 20; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 20; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,13 +12,14 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			fixLeftEdge: true,
 		},
 	});
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/invalid-bar-spacing.js b/tests/e2e/graphics/test-cases/initial-options/invalid-bar-spacing.js
index c0f6fafbb..606678a8c 100644
--- a/tests/e2e/graphics/test-cases/initial-options/invalid-bar-spacing.js
+++ b/tests/e2e/graphics/test-cases/initial-options/invalid-bar-spacing.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,14 +22,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			barSpacing: 1000,
 		},
 	});
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/left-price-scale.js b/tests/e2e/graphics/test-cases/initial-options/left-price-scale.js
index 12312956b..b17def47b 100644
--- a/tests/e2e/graphics/test-cases/initial-options/left-price-scale.js
+++ b/tests/e2e/graphics/test-cases/initial-options/left-price-scale.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			position: 'left',
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		title: 'AAPL',
 	});
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/log-price-scale-mode.js b/tests/e2e/graphics/test-cases/initial-options/log-price-scale-mode.js
index d1d29ebf4..6bbdf90fc 100644
--- a/tests/e2e/graphics/test-cases/initial-options/log-price-scale-mode.js
+++ b/tests/e2e/graphics/test-cases/initial-options/log-price-scale-mode.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,19 +12,20 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Logarithmic,
 		},
 	});
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 
 	// overlay price scale shouldn't inherit mode option
-	const histogramSeries = chart.addHistogramSeries({
+	var histogramSeries = chart.addHistogramSeries({
 		overlay: true,
 		color: '#ff0000',
 	});
diff --git a/tests/e2e/graphics/test-cases/initial-options/min-visible-bars.js b/tests/e2e/graphics/test-cases/initial-options/min-visible-bars.js
index cae2aa693..a41839391 100644
--- a/tests/e2e/graphics/test-cases/initial-options/min-visible-bars.js
+++ b/tests/e2e/graphics/test-cases/initial-options/min-visible-bars.js
@@ -1,6 +1,6 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,15 +22,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			barSpacing: 1000000,
 			rightOffset: 100000,
 		},
 	});
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/no-autoscale.js b/tests/e2e/graphics/test-cases/initial-options/no-autoscale.js
index 08fdde620..9c457d135 100644
--- a/tests/e2e/graphics/test-cases/initial-options/no-autoscale.js
+++ b/tests/e2e/graphics/test-cases/initial-options/no-autoscale.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			autoScale: false,
 		},
 	});
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/no-base-line.js b/tests/e2e/graphics/test-cases/initial-options/no-base-line.js
index 723c1b35c..014bd0915 100644
--- a/tests/e2e/graphics/test-cases/initial-options/no-base-line.js
+++ b/tests/e2e/graphics/test-cases/initial-options/no-base-line.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Percentage,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		baseLineVisible: false,
 	});
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/no-price-line.js b/tests/e2e/graphics/test-cases/initial-options/no-price-line.js
index a8db2725b..52673c92d 100644
--- a/tests/e2e/graphics/test-cases/initial-options/no-price-line.js
+++ b/tests/e2e/graphics/test-cases/initial-options/no-price-line.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Percentage,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		priceLineVisible: false,
 	});
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/no-price-scale.js b/tests/e2e/graphics/test-cases/initial-options/no-price-scale.js
index e53f710bc..9cd2d4229 100644
--- a/tests/e2e/graphics/test-cases/initial-options/no-price-scale.js
+++ b/tests/e2e/graphics/test-cases/initial-options/no-price-scale.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			position: 'none',
 		},
 	});
 
-	const firstSeries = chart.addLineSeries();
+	var firstSeries = chart.addLineSeries();
 
 	firstSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/non-auto-scale-price-scale.js b/tests/e2e/graphics/test-cases/initial-options/non-auto-scale-price-scale.js
index 37fc677e1..c4fbf4cf7 100644
--- a/tests/e2e/graphics/test-cases/initial-options/non-auto-scale-price-scale.js
+++ b/tests/e2e/graphics/test-cases/initial-options/non-auto-scale-price-scale.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,19 +12,20 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			autoScale: false,
 		},
 	});
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 
 	// overlay price scale shouldn't inherit autoScale option
-	const histogramSeries = chart.addHistogramSeries({
+	var histogramSeries = chart.addHistogramSeries({
 		overlay: true,
 		color: '#ff0000',
 	});
diff --git a/tests/e2e/graphics/test-cases/initial-options/price-format.js b/tests/e2e/graphics/test-cases/initial-options/price-format.js
index 5110d2bc0..80bdd8498 100644
--- a/tests/e2e/graphics/test-cases/initial-options/price-format.js
+++ b/tests/e2e/graphics/test-cases/initial-options/price-format.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,11 +12,12 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	// see issue#55
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		priceFormat: {
 			minMove: 0.00001,
 			precision: 5,
diff --git a/tests/e2e/graphics/test-cases/initial-options/price-line-source-default.js b/tests/e2e/graphics/test-cases/initial-options/price-line-source-default.js
index 98936cee2..01ce25502 100644
--- a/tests/e2e/graphics/test-cases/initial-options/price-line-source-default.js
+++ b/tests/e2e/graphics/test-cases/initial-options/price-line-source-default.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
 	series.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/price-line-source-last-visible.js b/tests/e2e/graphics/test-cases/initial-options/price-line-source-last-visible.js
index 12022a406..c38f2f747 100644
--- a/tests/e2e/graphics/test-cases/initial-options/price-line-source-last-visible.js
+++ b/tests/e2e/graphics/test-cases/initial-options/price-line-source-last-visible.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries({
+	var series = chart.addLineSeries({
 		priceLineSource: LightweightCharts.PriceLineSource.LastVisible,
 	});
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/price-line-style.js b/tests/e2e/graphics/test-cases/initial-options/price-line-style.js
index ccecfc465..edf33b0f8 100644
--- a/tests/e2e/graphics/test-cases/initial-options/price-line-style.js
+++ b/tests/e2e/graphics/test-cases/initial-options/price-line-style.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Percentage,
 		},
 	});
 
-	const firstSeries = chart.addLineSeries({
+	var firstSeries = chart.addLineSeries({
 		priceLineVisible: true,
 		priceLineWidth: 2,
 		priceLineColor: '#92151E',
diff --git a/tests/e2e/graphics/test-cases/initial-options/price-scale-entire-text-only.js b/tests/e2e/graphics/test-cases/initial-options/price-scale-entire-text-only.js
index b9cd4ac05..21501bdf5 100644
--- a/tests/e2e/graphics/test-cases/initial-options/price-scale-entire-text-only.js
+++ b/tests/e2e/graphics/test-cases/initial-options/price-scale-entire-text-only.js
@@ -1,3 +1,4 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
 	const chart = LightweightCharts.createChart(container, {
 		width: 600,
diff --git a/tests/e2e/graphics/test-cases/initial-options/small-candlesticks.js b/tests/e2e/graphics/test-cases/initial-options/small-candlesticks.js
index 9b8961f50..8e13bd06e 100644
--- a/tests/e2e/graphics/test-cases/initial-options/small-candlesticks.js
+++ b/tests/e2e/graphics/test-cases/initial-options/small-candlesticks.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base;
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,14 +22,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			barSpacing: 20,
 		},
 	});
 
-	const mainSeries = chart.addCandlestickSeries({
+	var mainSeries = chart.addCandlestickSeries({
 		drawBorder: true,
 		borderColor: 'blue',
 	});
diff --git a/tests/e2e/graphics/test-cases/initial-options/tick-marks-formatter.js b/tests/e2e/graphics/test-cases/initial-options/tick-marks-formatter.js
index 6ff5cef6c..c577a8b6e 100644
--- a/tests/e2e/graphics/test-cases/initial-options/tick-marks-formatter.js
+++ b/tests/e2e/graphics/test-cases/initial-options/tick-marks-formatter.js
@@ -17,16 +17,14 @@ function getData() {
 	];
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			timeVisible: true,
 			secondsVisible: true,
-			tickMarkFormatter: (time, tickMarkType, locale) => {
-				const date = LightweightCharts.isBusinessDay(time)
-					? new Date(Date.UTC(time.year, time.month - 1, time.day))
-					: new Date(time * 1000);
-
+			tickMarkFormatter: function(timePoint, tickMarkType, locale) {
+				var date = new Date(timePoint.timestamp * 1000);
 				switch (tickMarkType) {
 					case LightweightCharts.TickMarkType.Year:
 						return 'Y' + date.getUTCFullYear();
@@ -49,7 +47,7 @@ function runTestCase(container) {
 		},
 	});
 
-	const firstSeries = chart.addLineSeries();
+	var firstSeries = chart.addLineSeries();
 	firstSeries.setData(getData());
 	chart.timeScale().fitContent();
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/time-formatter.js b/tests/e2e/graphics/test-cases/initial-options/time-formatter.js
index 4976368f6..1068a62d9 100644
--- a/tests/e2e/graphics/test-cases/initial-options/time-formatter.js
+++ b/tests/e2e/graphics/test-cases/initial-options/time-formatter.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,10 +13,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		localization: {
-			timeFormatter: (businessDayOrTimestamp) => {
+			timeFormatter: function(businessDayOrTimestamp) {
 				if (LightweightCharts.isBusinessDay(businessDayOrTimestamp)) {
 					return 'bd=' + businessDayOrTimestamp.day + '-' + businessDayOrTimestamp.month + '-' + businessDayOrTimestamp.year;
 				}
@@ -26,6 +27,6 @@ function runTestCase(container) {
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/time-scale.js b/tests/e2e/graphics/test-cases/initial-options/time-scale.js
index b57700bb4..99b101183 100644
--- a/tests/e2e/graphics/test-cases/initial-options/time-scale.js
+++ b/tests/e2e/graphics/test-cases/initial-options/time-scale.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,15 +22,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			rightOffset: 10,
 			barSpacing: 12,
 		},
 	});
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/initial-options/transparent-background.js b/tests/e2e/graphics/test-cases/initial-options/transparent-background.js
index b8a460e18..cda4725b5 100644
--- a/tests/e2e/graphics/test-cases/initial-options/transparent-background.js
+++ b/tests/e2e/graphics/test-cases/initial-options/transparent-background.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,14 +13,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		layout: {
 			backgroundColor: 'rgba(80, 80, 80, 0.5)',
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
 	series.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/initial-options/zero-precision.js b/tests/e2e/graphics/test-cases/initial-options/zero-precision.js
index ab687419e..a4480d5f2 100644
--- a/tests/e2e/graphics/test-cases/initial-options/zero-precision.js
+++ b/tests/e2e/graphics/test-cases/initial-options/zero-precision.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,11 +12,12 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	// see issue#59
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		priceFormat: {
 			minMove: 1,
 			precision: 0,
diff --git a/tests/e2e/graphics/test-cases/logical-range/bars-in-gap.js b/tests/e2e/graphics/test-cases/logical-range/bars-in-gap.js
index bb6d0beed..75571e627 100644
--- a/tests/e2e/graphics/test-cases/logical-range/bars-in-gap.js
+++ b/tests/e2e/graphics/test-cases/logical-range/bars-in-gap.js
@@ -1,7 +1,7 @@
 function generateData(count) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < count; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < count; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,11 +13,12 @@ function generateData(count) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
-	const series = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
 	mainSeries.setData(generateData(61));
 
@@ -26,7 +27,7 @@ function runTestCase(container) {
 
 	chart.timeScale().fitContent();
 
-	const bars = series.barsInLogicalRange({ from: 15, to: 25 });
+	var bars = series.barsInLogicalRange({ from: 15, to: 25 });
 	console.assert(bars !== null, 'Bars shouldn\'t null');
 
 	console.assert(bars.from === undefined, `from date should be undefined, actual=${bars.from}`);
diff --git a/tests/e2e/graphics/test-cases/logical-range/bars-in-range.js b/tests/e2e/graphics/test-cases/logical-range/bars-in-range.js
index aaa51305c..424e6360d 100644
--- a/tests/e2e/graphics/test-cases/logical-range/bars-in-range.js
+++ b/tests/e2e/graphics/test-cases/logical-range/bars-in-range.js
@@ -1,7 +1,7 @@
 function generateData(count) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < count; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < count; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,17 +13,18 @@ function generateData(count) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
-	const data = generateData(10);
+	var data = generateData(10);
 	series.setData(data);
 
 	chart.timeScale().fitContent();
 
-	const bars1 = series.barsInLogicalRange({ from: 0, to: 9 });
+	var bars1 = series.barsInLogicalRange({ from: 0, to: 9 });
 	console.assert(bars1 !== null, 'Bars shouldn\'t be null');
 
 	console.assert(bars1.from === data[0].time, `from date should be the first data item's time, expected=${data[0].time}, actual=${bars1.from}`);
@@ -31,7 +32,7 @@ function runTestCase(container) {
 	console.assert(bars1.barsBefore === 0, `barsBefore should be zero, actual=${bars1.barsBefore}`);
 	console.assert(bars1.barsAfter === 0, `barsAfter should be zero, actual=${bars1.barsAfter}`);
 
-	const bars2 = series.barsInLogicalRange({ from: -5, to: 9 });
+	var bars2 = series.barsInLogicalRange({ from: -5, to: 9 });
 	console.assert(bars2 !== null, 'Bars shouldn\'t be null');
 
 	console.assert(bars2.from === data[0].time, `from date should be the first data item's time, expected=${data[0].time}, actual=${bars2.from}`);
@@ -39,7 +40,7 @@ function runTestCase(container) {
 	console.assert(bars2.barsBefore === -5, `barsBefore should be -5, actual=${bars2.barsBefore}`);
 	console.assert(bars2.barsAfter === 0, `barsAfter should be zero, actual=${bars2.barsAfter}`);
 
-	const bars3 = series.barsInLogicalRange({ from: 5, to: 14 });
+	var bars3 = series.barsInLogicalRange({ from: 5, to: 14 });
 	console.assert(bars3 !== null, 'Bars shouldn\'t be null');
 
 	console.assert(bars3.from === data[5].time, `from date should the time of 5th data item, expected=${data[5].time}, actual=${bars3.from}`);
@@ -47,7 +48,7 @@ function runTestCase(container) {
 	console.assert(bars3.barsBefore === 5, `barsBefore should be 5, actual=${bars3.barsBefore}`);
 	console.assert(bars3.barsAfter === -5, `barsAfter should be -5, actual=${bars3.barsAfter}`);
 
-	const bars4 = series.barsInLogicalRange({ from: 4, to: 5 });
+	var bars4 = series.barsInLogicalRange({ from: 4, to: 5 });
 	console.assert(bars4 !== null, 'Bars shouldn\'t be null');
 
 	console.assert(bars4.from === data[4].time, `from date should the time of 4th data item, expected=${data[4].time}, actual=${bars4.from}`);
@@ -55,7 +56,7 @@ function runTestCase(container) {
 	console.assert(bars4.barsBefore === 4, `barsBefore should be 4, actual=${bars4.barsBefore}`);
 	console.assert(bars4.barsAfter === 4, `barsAfter should be 4, actual=${bars4.barsAfter}`);
 
-	const bars5 = series.barsInLogicalRange({ from: -5, to: 14 });
+	var bars5 = series.barsInLogicalRange({ from: -5, to: 14 });
 	console.assert(bars5 !== null, 'Bars shouldn\'t be null');
 
 	console.assert(bars5.from === data[0].time, `from date should be the first data item's time, expected=${data[0].time}, actual=${bars5.from}`);
@@ -63,7 +64,7 @@ function runTestCase(container) {
 	console.assert(bars5.barsBefore === -5, `barsBefore should be -5, actual=${bars5.barsBefore}`);
 	console.assert(bars5.barsAfter === -5, `barsAfter should be -5, actual=${bars5.barsAfter}`);
 
-	const emptySeries = chart.addLineSeries();
+	var emptySeries = chart.addLineSeries();
 	console.assert(emptySeries.barsInLogicalRange({ from: 0, to: 3 }) === null, 'Bars should be null if series is empty');
 
 	console.assert(series.barsInLogicalRange(null) === null, 'Bars should be null if range is null');
diff --git a/tests/e2e/graphics/test-cases/logical-range/subscribe-visible-logical-range-change.js b/tests/e2e/graphics/test-cases/logical-range/subscribe-visible-logical-range-change.js
index b381678cb..e360a15e6 100644
--- a/tests/e2e/graphics/test-cases/logical-range/subscribe-visible-logical-range-change.js
+++ b/tests/e2e/graphics/test-cases/logical-range/subscribe-visible-logical-range-change.js
@@ -1,7 +1,7 @@
 function generateData(count) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < count; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < count; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,19 +13,20 @@ function generateData(count) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 
-	const data = generateData(10);
+	var data = generateData(10);
 	series.setData(data);
 
 	return new Promise(resolve => {
 		setTimeout(() => {
-			const timeScale = chart.timeScale();
+			var timeScale = chart.timeScale();
 
-			const range = { from: 0, to: 5 };
+			var range = { from: 0, to: 5 };
 			timeScale.setVisibleLogicalRange(range);
 
 			timeScale.subscribeVisibleLogicalRangeChange(newRange => {
diff --git a/tests/e2e/graphics/test-cases/months-chart.js b/tests/e2e/graphics/test-cases/months-chart.js
index d18d1833b..1706bc1eb 100644
--- a/tests/e2e/graphics/test-cases/months-chart.js
+++ b/tests/e2e/graphics/test-cases/months-chart.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 12; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 12; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,10 +13,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const firstSeries = chart.addLineSeries();
+	var firstSeries = chart.addLineSeries();
 	firstSeries.setData(generateData());
 	chart.timeScale().fitContent();
 }
diff --git a/tests/e2e/graphics/test-cases/series-markers/marker-in-gap-from-left.js b/tests/e2e/graphics/test-cases/series-markers/marker-in-gap-from-left.js
index a934d0fb8..503ae1afb 100644
--- a/tests/e2e/graphics/test-cases/series-markers/marker-in-gap-from-left.js
+++ b/tests/e2e/graphics/test-cases/series-markers/marker-in-gap-from-left.js
@@ -1,7 +1,8 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const lineSeries = chart.addLineSeries();
+	var lineSeries = chart.addLineSeries();
 
 	lineSeries.setData([
 		{ time: 1556877600, value: 230.12 },
@@ -12,7 +13,7 @@ function runTestCase(container) {
 		{ time: 1556895600, value: 232.52 },
 	]);
 
-	const lineSeries1 = chart.addLineSeries({
+	var lineSeries1 = chart.addLineSeries({
 		color: 'red',
 	});
 
diff --git a/tests/e2e/graphics/test-cases/series-markers/marker-in-gap.js b/tests/e2e/graphics/test-cases/series-markers/marker-in-gap.js
index 00bbecaa9..030d5b15a 100644
--- a/tests/e2e/graphics/test-cases/series-markers/marker-in-gap.js
+++ b/tests/e2e/graphics/test-cases/series-markers/marker-in-gap.js
@@ -1,7 +1,8 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const lineSeries = chart.addLineSeries();
+	var lineSeries = chart.addLineSeries();
 
 	lineSeries.setData([
 		{ time: 1556877600, value: 230.12 },
@@ -12,7 +13,7 @@ function runTestCase(container) {
 		{ time: 1556895600, value: 232.52 },
 	]);
 
-	const lineSeries1 = chart.addLineSeries({
+	var lineSeries1 = chart.addLineSeries({
 		color: 'red',
 	});
 
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-arrow-markers.js b/tests/e2e/graphics/test-cases/series-markers/series-arrow-markers.js
index 8f3c948d3..4ab5f499b 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-arrow-markers.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-arrow-markers.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,12 +22,13 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries();
+	var mainSeries = chart.addBarSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
 	mainSeries.setMarkers([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-circle-markers.js b/tests/e2e/graphics/test-cases/series-markers/series-circle-markers.js
index f61fbf0a0..002d6a6ba 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-circle-markers.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-circle-markers.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,12 +22,13 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries();
+	var mainSeries = chart.addBarSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
 	mainSeries.setMarkers([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-aligned.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-aligned.js
index 5b40d7904..97fa2927b 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-aligned.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-aligned.js
@@ -1,5 +1,6 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	const line = chart.addLineSeries();
 	line.setData([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-max-bar-spacing.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-max-bar-spacing.js
index 9d1d1b5c1..340395647 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-max-bar-spacing.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-max-bar-spacing.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,15 +12,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
-	const markers = [
+	var markers = [
 		{ time: data[data.length - 4].time, position: 'inBar', color: 'red', shape: 'square' },
 		{ time: data[data.length - 3].time, position: 'inBar', color: 'red', shape: 'circle' },
 		{ time: data[data.length - 2].time, position: 'inBar', color: 'red', shape: 'arrowDown' },
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-min-bar-spacing.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-min-bar-spacing.js
index ee5e6ba89..9a2a58c94 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-min-bar-spacing.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-min-bar-spacing.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,15 +12,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
-	const markers = [
+	var markers = [
 		{ time: data[data.length - 10].time, position: 'inBar', color: 'red', shape: 'arrowUp' },
 		{ time: data[data.length - 20].time, position: 'inBar', color: 'red', shape: 'arrowDown' },
 		{ time: data[data.length - 30].time, position: 'inBar', color: 'red', shape: 'circle' },
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-object-business-day.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-object-business-day.js
index d264ba3ba..717ed250d 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-object-business-day.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-object-business-day.js
@@ -1,5 +1,6 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	const line = chart.addLineSeries();
 	line.setData([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-out-of-visible-range.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-out-of-visible-range.js
index 6795a05c8..48030e98c 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-out-of-visible-range.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-out-of-visible-range.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,12 +12,13 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
 	mainSeries.setMarkers([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-re-aligned.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-re-aligned.js
index ac17568c1..19920c363 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-re-aligned.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-re-aligned.js
@@ -1,5 +1,6 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	const line = chart.addLineSeries();
 	line.setData([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-update.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-update.js
index 085f07174..d6abb394b 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-update.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-update.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,15 +12,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
-	const markers = [
+	var markers = [
 		{ time: data[data.length - 10].time, position: 'belowBar', color: 'red', shape: 'arrowUp' },
 		{ time: data[data.length - 20].time, position: 'belowBar', color: 'red', shape: 'arrowUp' },
 		{ time: data[data.length - 30].time, position: 'belowBar', color: 'red', shape: 'arrowUp' },
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-markers-with-text.js b/tests/e2e/graphics/test-cases/series-markers/series-markers-with-text.js
index 226b76a14..dd5f84d9b 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-markers-with-text.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-markers-with-text.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,8 +22,9 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(
+	var chart = LightweightCharts.createChart(
 		container,
 		{
 			layout: {
@@ -32,9 +33,9 @@ function runTestCase(container) {
 		}
 	);
 
-	const mainSeries = chart.addBarSeries();
+	var mainSeries = chart.addBarSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
 	mainSeries.setMarkers([
diff --git a/tests/e2e/graphics/test-cases/series-markers/series-square-markers.js b/tests/e2e/graphics/test-cases/series-markers/series-square-markers.js
index 8f5a77d25..0c2b39fe5 100644
--- a/tests/e2e/graphics/test-cases/series-markers/series-square-markers.js
+++ b/tests/e2e/graphics/test-cases/series-markers/series-square-markers.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,12 +22,13 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries();
+	var mainSeries = chart.addBarSeries();
 
-	const data = generateData();
+	var data = generateData();
 	mainSeries.setData(data);
 
 	mainSeries.setMarkers([
diff --git a/tests/e2e/graphics/test-cases/series-markers/set-markers-before-series-data.js b/tests/e2e/graphics/test-cases/series-markers/set-markers-before-series-data.js
index 2c610a0f4..7a1cecbfa 100644
--- a/tests/e2e/graphics/test-cases/series-markers/set-markers-before-series-data.js
+++ b/tests/e2e/graphics/test-cases/series-markers/set-markers-before-series-data.js
@@ -1,7 +1,8 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setMarkers([
 		{
diff --git a/tests/e2e/graphics/test-cases/series/2-points-line-series.js b/tests/e2e/graphics/test-cases/series/2-points-line-series.js
index 87f50e7de..13ebaec0b 100644
--- a/tests/e2e/graphics/test-cases/series/2-points-line-series.js
+++ b/tests/e2e/graphics/test-cases/series/2-points-line-series.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,14 +22,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries();
-	const lineSeries = chart.addLineSeries();
+	var mainSeries = chart.addBarSeries();
+	var lineSeries = chart.addLineSeries();
 
-	const data = generateData();
-	const lineData = [
+	var data = generateData();
+	var lineData = [
 		{ time: data[0].time, value: data[0].close },
 		{ time: data[data.length - 1].time, value: data[data.length - 1].close },
 	];
diff --git a/tests/e2e/graphics/test-cases/series/add-series-after-volume.js b/tests/e2e/graphics/test-cases/series/add-series-after-volume.js
index 39df0a546..81b08198c 100644
--- a/tests/e2e/graphics/test-cases/series/add-series-after-volume.js
+++ b/tests/e2e/graphics/test-cases/series/add-series-after-volume.js
@@ -1,11 +1,12 @@
 // fix the first case from
 // https://github.com/tradingview/lightweight-charts/issues/110
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const areaSeries = chart.addAreaSeries(); // or any other series type
-	const volumeSeries = chart.addHistogramSeries();
+	var areaSeries = chart.addAreaSeries(); // or any other series type
+	var volumeSeries = chart.addHistogramSeries();
 
 	volumeSeries.setData([
 		{ time: '2019-05-24', value: 23714686.00, color: 'red' },
diff --git a/tests/e2e/graphics/test-cases/series/alternate-histogram-items-with-gaps.js b/tests/e2e/graphics/test-cases/series/alternate-histogram-items-with-gaps.js
index ee58ab408..d2a895f17 100644
--- a/tests/e2e/graphics/test-cases/series/alternate-histogram-items-with-gaps.js
+++ b/tests/e2e/graphics/test-cases/series/alternate-histogram-items-with-gaps.js
@@ -1,7 +1,7 @@
 function generateData(step) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 30; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 30; ++i) {
 		if (i % step === 0) {
 			res.push({
 				time: time.getTime() / 1000,
@@ -14,16 +14,17 @@ function generateData(step) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			barSpacing: 100,
 		},
 	});
 
-	const lineSeries = chart.addLineSeries();
+	var lineSeries = chart.addLineSeries();
 	lineSeries.setData(generateData(1));
 
-	const histogramSeries = chart.addHistogramSeries();
+	var histogramSeries = chart.addHistogramSeries();
 	histogramSeries.setData(generateData(3));
 }
diff --git a/tests/e2e/graphics/test-cases/series/area-out-of-viewport.js b/tests/e2e/graphics/test-cases/series/area-out-of-viewport.js
index b64869977..77652a781 100644
--- a/tests/e2e/graphics/test-cases/series/area-out-of-viewport.js
+++ b/tests/e2e/graphics/test-cases/series/area-out-of-viewport.js
@@ -1,7 +1,8 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const areaSeries = chart.addAreaSeries();
+	var areaSeries = chart.addAreaSeries();
 	areaSeries.setData([
 		{ time: '2018-12-22', value: 32.51 },
 		{ time: '2018-12-23', value: 31.11 },
@@ -15,7 +16,7 @@ function runTestCase(container) {
 		{ time: '2018-12-31', value: 22.67 },
 	]);
 
-	const lineSeries = chart.addLineSeries();
+	var lineSeries = chart.addLineSeries();
 	lineSeries.setData([
 		{ time: '2018-12-12', value: 24.11 },
 		{ time: '2018-12-13', value: 31.74 },
diff --git a/tests/e2e/graphics/test-cases/series/area-step-line.js b/tests/e2e/graphics/test-cases/series/area-step-line.js
index f1648cb25..85db612a4 100644
--- a/tests/e2e/graphics/test-cases/series/area-step-line.js
+++ b/tests/e2e/graphics/test-cases/series/area-step-line.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addAreaSeries({
+	var mainSeries = chart.addAreaSeries({
 		lineType: LightweightCharts.LineType.WithSteps,
 	});
 
diff --git a/tests/e2e/graphics/test-cases/series/area.js b/tests/e2e/graphics/test-cases/series/area.js
index d1761352f..88d3275fd 100644
--- a/tests/e2e/graphics/test-cases/series/area.js
+++ b/tests/e2e/graphics/test-cases/series/area.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/series/bar-semitransparent.js b/tests/e2e/graphics/test-cases/series/bar-semitransparent.js
index 8d35d7910..ec157902d 100644
--- a/tests/e2e/graphics/test-cases/series/bar-semitransparent.js
+++ b/tests/e2e/graphics/test-cases/series/bar-semitransparent.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,10 +22,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		upColor: 'rgba(0, 250, 0, 0.3)',
 		downColor: 'rgba(250, 0, 0, 0.3)',
 	});
diff --git a/tests/e2e/graphics/test-cases/series/bar.js b/tests/e2e/graphics/test-cases/series/bar.js
index 53b623fb4..149c2e401 100644
--- a/tests/e2e/graphics/test-cases/series/bar.js
+++ b/tests/e2e/graphics/test-cases/series/bar.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 1000;
-	const base = i / 5;
+	var step = (i % 20) / 1000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,10 +22,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries();
+	var mainSeries = chart.addBarSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/series/candlesticks-semitransparent.js b/tests/e2e/graphics/test-cases/series/candlesticks-semitransparent.js
index e1087742e..d7b92cf5f 100644
--- a/tests/e2e/graphics/test-cases/series/candlesticks-semitransparent.js
+++ b/tests/e2e/graphics/test-cases/series/candlesticks-semitransparent.js
@@ -1,6 +1,6 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,10 +22,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addCandlestickSeries({
+	var mainSeries = chart.addCandlestickSeries({
 		borderColor: 'rgba(0, 0, 255, 0.2)',
 		upColor: 'rgba(0, 80, 0, 0.2)',
 		downColor: 'rgba(80, 0, 0, 0.2)',
diff --git a/tests/e2e/graphics/test-cases/series/candlesticks-with-huge-range.js b/tests/e2e/graphics/test-cases/series/candlesticks-with-huge-range.js
index 0b89090a6..5bf8e39c1 100644
--- a/tests/e2e/graphics/test-cases/series/candlesticks-with-huge-range.js
+++ b/tests/e2e/graphics/test-cases/series/candlesticks-with-huge-range.js
@@ -1,6 +1,6 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2000, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 10000; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2000, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 10000; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,10 +22,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/series/candlesticks.js b/tests/e2e/graphics/test-cases/series/candlesticks.js
index 1318bfb31..e6c1652a6 100644
--- a/tests/e2e/graphics/test-cases/series/candlesticks.js
+++ b/tests/e2e/graphics/test-cases/series/candlesticks.js
@@ -1,6 +1,6 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base * (1 - step);
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -22,10 +22,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addCandlestickSeries();
+	var mainSeries = chart.addCandlestickSeries();
 
 	mainSeries.setData(generateData());
 }
diff --git a/tests/e2e/graphics/test-cases/series/change-colors-via-set-data-in-histogram.js b/tests/e2e/graphics/test-cases/series/change-colors-via-set-data-in-histogram.js
index e34ef3501..86f6866c8 100644
--- a/tests/e2e/graphics/test-cases/series/change-colors-via-set-data-in-histogram.js
+++ b/tests/e2e/graphics/test-cases/series/change-colors-via-set-data-in-histogram.js
@@ -1,7 +1,7 @@
 function generateData(colors) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 30; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 30; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,10 +13,11 @@ function generateData(colors) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addHistogramSeries();
+	var mainSeries = chart.addHistogramSeries();
 
 	mainSeries.setData(generateData([
 		'red',
diff --git a/tests/e2e/graphics/test-cases/series/histogram-add-new-color-on-update.js b/tests/e2e/graphics/test-cases/series/histogram-add-new-color-on-update.js
index 64752d3c1..7eeee8031 100644
--- a/tests/e2e/graphics/test-cases/series/histogram-add-new-color-on-update.js
+++ b/tests/e2e/graphics/test-cases/series/histogram-add-new-color-on-update.js
@@ -1,12 +1,12 @@
 function generateData() {
-	const colors = [
+	var colors = [
 		'#013370',
 		undefined,
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -19,16 +19,17 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addHistogramSeries({
+	var mainSeries = chart.addHistogramSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 	});
 
-	const data = generateData();
-	const lastItem = data.splice(-1, 1)[0];
+	var data = generateData();
+	var lastItem = data.splice(-1, 1)[0];
 	mainSeries.setData(data);
 
 	lastItem.color = '#ccaaee';
diff --git a/tests/e2e/graphics/test-cases/series/histogram-change-default-color.js b/tests/e2e/graphics/test-cases/series/histogram-change-default-color.js
index 0fb20dc17..8cae039d9 100644
--- a/tests/e2e/graphics/test-cases/series/histogram-change-default-color.js
+++ b/tests/e2e/graphics/test-cases/series/histogram-change-default-color.js
@@ -1,7 +1,8 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addHistogramSeries({
+	var series = chart.addHistogramSeries({
 		color: 'blue',
 	});
 
diff --git a/tests/e2e/graphics/test-cases/series/histogram-out-of-range.js b/tests/e2e/graphics/test-cases/series/histogram-out-of-range.js
index 09cba887a..7580025ff 100644
--- a/tests/e2e/graphics/test-cases/series/histogram-out-of-range.js
+++ b/tests/e2e/graphics/test-cases/series/histogram-out-of-range.js
@@ -1,8 +1,9 @@
 // see https://github.com/tradingview/lightweight-charts/issues/133
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
-	const series = chart.addCandlestickSeries();
+	var chart = LightweightCharts.createChart(container);
+	var series = chart.addCandlestickSeries();
 
 	series.setData([
 		{ time: '2018-12-06', open: 141.77, high: 170.39, low: 120.25, close: 145.72 },
diff --git a/tests/e2e/graphics/test-cases/series/histogram-update-without-set-data.js b/tests/e2e/graphics/test-cases/series/histogram-update-without-set-data.js
index 4d4a3061a..d459c39ac 100644
--- a/tests/e2e/graphics/test-cases/series/histogram-update-without-set-data.js
+++ b/tests/e2e/graphics/test-cases/series/histogram-update-without-set-data.js
@@ -1,11 +1,12 @@
 // fix the second case from
 // https://github.com/tradingview/lightweight-charts/issues/110
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const areaSeries = chart.addAreaSeries();
-	const volumeSeries = chart.addHistogramSeries();
+	var areaSeries = chart.addAreaSeries();
+	var volumeSeries = chart.addHistogramSeries();
 
 	volumeSeries.update(
 		{ time: '2019-05-24', value: 23714686.00 }
diff --git a/tests/e2e/graphics/test-cases/series/histogram.js b/tests/e2e/graphics/test-cases/series/histogram.js
index 952f57f76..bf007da9b 100644
--- a/tests/e2e/graphics/test-cases/series/histogram.js
+++ b/tests/e2e/graphics/test-cases/series/histogram.js
@@ -1,13 +1,13 @@
 function generateData() {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -19,10 +19,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addHistogramSeries({
+	var mainSeries = chart.addHistogramSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 	});
diff --git a/tests/e2e/graphics/test-cases/series/line.js b/tests/e2e/graphics/test-cases/series/line.js
index df1c7da7e..1781a1c42 100644
--- a/tests/e2e/graphics/test-cases/series/line.js
+++ b/tests/e2e/graphics/test-cases/series/line.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 	});
diff --git a/tests/e2e/graphics/test-cases/series/overlay-series-title.js b/tests/e2e/graphics/test-cases/series/overlay-series-title.js
deleted file mode 100644
index d90f2448a..000000000
--- a/tests/e2e/graphics/test-cases/series/overlay-series-title.js
+++ /dev/null
@@ -1,31 +0,0 @@
-function generateData(func) {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		res.push({
-			time: time.getTime() / 1000,
-			value: func(i),
-		});
-
-		time.setUTCDate(time.getUTCDate() + 1);
-	}
-	return res;
-}
-
-function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
-
-	const mainSeries = chart.addLineSeries({
-		color: '#ff0000',
-		title: 'Main series',
-	});
-
-	const overlaySeries = chart.addLineSeries({
-		color: '#00ff00',
-		title: 'Overlay series',
-		priceScaleId: 'overlay-scale-id',
-	});
-
-	mainSeries.setData(generateData(Math.sin));
-	overlaySeries.setData(generateData(Math.cos));
-}
diff --git a/tests/e2e/graphics/test-cases/series/override-autoscale-fixed-range.js b/tests/e2e/graphics/test-cases/series/override-autoscale-fixed-range.js
index 153285308..d5a10132e 100644
--- a/tests/e2e/graphics/test-cases/series/override-autoscale-fixed-range.js
+++ b/tests/e2e/graphics/test-cases/series/override-autoscale-fixed-range.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: 50 + 30 * Math.sin(Math.PI * i / 50),
@@ -12,8 +12,9 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			scaleMargins: {
 				bottom: 0,
@@ -22,15 +23,17 @@ function runTestCase(container) {
 		},
 	});
 
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
-		autoscaleInfoProvider: () => ({
-			priceRange: {
-				minValue: 0,
-				maxValue: 100,
-			},
-		}),
+		autoscaleInfoProvider: function() {
+			return {
+				priceRange: {
+					minValue: 0,
+					maxValue: 100,
+				},
+			};
+		},
 	});
 
 	mainSeries.setData(generateData());
diff --git a/tests/e2e/graphics/test-cases/series/price-line-apply-options.js b/tests/e2e/graphics/test-cases/series/price-line-apply-options.js
index d2cde33da..706864df2 100644
--- a/tests/e2e/graphics/test-cases/series/price-line-apply-options.js
+++ b/tests/e2e/graphics/test-cases/series/price-line-apply-options.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 60; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 60; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,15 +12,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 
 	chart.timeScale().fitContent();
 
-	const line = series.createPriceLine({
+	var line = series.createPriceLine({
 		price: 10,
 		color: 'red',
 		lineWidth: 1,
diff --git a/tests/e2e/graphics/test-cases/series/price-line-with-percentage-scale-mode.js b/tests/e2e/graphics/test-cases/series/price-line-with-percentage-scale-mode.js
index c557fc4b6..2ec5ad880 100644
--- a/tests/e2e/graphics/test-cases/series/price-line-with-percentage-scale-mode.js
+++ b/tests/e2e/graphics/test-cases/series/price-line-with-percentage-scale-mode.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 1; i < 60; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 1; i < 60; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Percentage,
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 
 	series.createPriceLine({ price: 10 });
diff --git a/tests/e2e/graphics/test-cases/series/price-lines-align-labels.js b/tests/e2e/graphics/test-cases/series/price-lines-align-labels.js
index 29ea02815..91e4bd942 100644
--- a/tests/e2e/graphics/test-cases/series/price-lines-align-labels.js
+++ b/tests/e2e/graphics/test-cases/series/price-lines-align-labels.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 60; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 60; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,15 +12,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Persentage,
 			alignLabels: true,
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 
 	series.createPriceLine({ price: 58 });
diff --git a/tests/e2e/graphics/test-cases/series/price-lines-do-not-align-labels.js b/tests/e2e/graphics/test-cases/series/price-lines-do-not-align-labels.js
index 5d9ff095f..d82e8d8f0 100644
--- a/tests/e2e/graphics/test-cases/series/price-lines-do-not-align-labels.js
+++ b/tests/e2e/graphics/test-cases/series/price-lines-do-not-align-labels.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 60; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 60; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,15 +12,16 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			mode: LightweightCharts.PriceScaleMode.Persentage,
 			alignLabels: false,
 		},
 	});
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 
 	series.createPriceLine({ price: 58 });
diff --git a/tests/e2e/graphics/test-cases/series/price-lines-remove.js b/tests/e2e/graphics/test-cases/series/price-lines-remove.js
index 0b69ebcc8..63c297a45 100644
--- a/tests/e2e/graphics/test-cases/series/price-lines-remove.js
+++ b/tests/e2e/graphics/test-cases/series/price-lines-remove.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 60; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 60; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,14 +12,15 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 
-	const line1 = series.createPriceLine({ price: 10 });
-	const line2 = series.createPriceLine({ price: 20 });
+	var line1 = series.createPriceLine({ price: 10 });
+	var line2 = series.createPriceLine({ price: 20 });
 
 	return new Promise((resolve) => {
 		setTimeout(() => {
diff --git a/tests/e2e/graphics/test-cases/series/price-lines.js b/tests/e2e/graphics/test-cases/series/price-lines.js
index e9dfbde05..03a565dab 100644
--- a/tests/e2e/graphics/test-cases/series/price-lines.js
+++ b/tests/e2e/graphics/test-cases/series/price-lines.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 60; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 60; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const series = chart.addLineSeries();
+	var series = chart.addLineSeries();
 	series.setData(generateData());
 
 	chart.timeScale().fitContent();
diff --git a/tests/e2e/graphics/test-cases/series/set-empty-data-to-histogram.js b/tests/e2e/graphics/test-cases/series/set-empty-data-to-histogram.js
index 58b21d92b..893565377 100644
--- a/tests/e2e/graphics/test-cases/series/set-empty-data-to-histogram.js
+++ b/tests/e2e/graphics/test-cases/series/set-empty-data-to-histogram.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 30; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 30; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -13,7 +13,7 @@ function generateData() {
 }
 
 function generateColoredData() {
-	const data = generateData();
+	var data = generateData();
 	data.forEach((item, index) => {
 		item.color = index % 2 === 0 ? 'rgba(0, 150, 136, 0.8)' : 'rgba(255,82,82, 0.8)';
 	});
@@ -21,11 +21,12 @@ function generateColoredData() {
 	return data;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const areaSeries = chart.addAreaSeries();
-	const volumeSeries = chart.addHistogramSeries();
+	var areaSeries = chart.addAreaSeries();
+	var volumeSeries = chart.addHistogramSeries();
 
 	areaSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/series/several-non-regular-series.js b/tests/e2e/graphics/test-cases/series/several-non-regular-series.js
index 512e5bb6f..327c77fb9 100644
--- a/tests/e2e/graphics/test-cases/series/several-non-regular-series.js
+++ b/tests/e2e/graphics/test-cases/series/several-non-regular-series.js
@@ -1,8 +1,9 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const lineSeries1 = chart.addLineSeries();
-	const lineSeries2 = chart.addLineSeries();
+	var lineSeries1 = chart.addLineSeries();
+	var lineSeries2 = chart.addLineSeries();
 
 	lineSeries1.setData([
 		{ time: '2020-01-02', value: 2 },
diff --git a/tests/e2e/graphics/test-cases/series/step-line.js b/tests/e2e/graphics/test-cases/series/step-line.js
index bd13c9c68..b466809e3 100644
--- a/tests/e2e/graphics/test-cases/series/step-line.js
+++ b/tests/e2e/graphics/test-cases/series/step-line.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		lineWidth: 1,
 		lineType: LightweightCharts.LineType.WithSteps,
 		color: '#ff0000',
diff --git a/tests/e2e/graphics/test-cases/series/two-series-one-not-autoscaled.js b/tests/e2e/graphics/test-cases/series/two-series-one-not-autoscaled.js
index 9d7362514..1b51232ab 100644
--- a/tests/e2e/graphics/test-cases/series/two-series-one-not-autoscaled.js
+++ b/tests/e2e/graphics/test-cases/series/two-series-one-not-autoscaled.js
@@ -1,8 +1,8 @@
 function generateData(amplitude) {
-	const res = [];
+	var res = [];
 	amplitude = amplitude || 30;
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: 50 + amplitude * Math.sin(Math.PI * i / 50),
@@ -13,8 +13,9 @@ function generateData(amplitude) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		priceScale: {
 			scaleMargins: {
 				bottom: 0,
@@ -23,17 +24,19 @@ function runTestCase(container) {
 		},
 	});
 
-	const mainSeries = chart.addLineSeries({
+	var mainSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#0000ff',
 	});
 
 	mainSeries.setData(generateData(20));
 
-	const secondSeries = chart.addLineSeries({
+	var secondSeries = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
-		autoscaleInfoProvider: () => null,
+		autoscaleInfoProvider: function() {
+			return null;
+		},
 	});
 
 	secondSeries.setData(generateData());
diff --git a/tests/e2e/graphics/test-cases/set-visible-range-after-time.js b/tests/e2e/graphics/test-cases/set-visible-range-after-time.js
index fb18df710..626c07b78 100644
--- a/tests/e2e/graphics/test-cases/set-visible-range-after-time.js
+++ b/tests/e2e/graphics/test-cases/set-visible-range-after-time.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 1000; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 1000; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/set-visible-range-with-small-range.js b/tests/e2e/graphics/test-cases/set-visible-range-with-small-range.js
index d79575091..812232412 100644
--- a/tests/e2e/graphics/test-cases/set-visible-range-with-small-range.js
+++ b/tests/e2e/graphics/test-cases/set-visible-range-with-small-range.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 5; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 5; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/set-visible-range-with-two-series.js b/tests/e2e/graphics/test-cases/set-visible-range-with-two-series.js
index a80a12f7c..105791bbd 100644
--- a/tests/e2e/graphics/test-cases/set-visible-range-with-two-series.js
+++ b/tests/e2e/graphics/test-cases/set-visible-range-with-two-series.js
@@ -1,5 +1,6 @@
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
 	const line1 = chart.addLineSeries();
 	line1.setData([
diff --git a/tests/e2e/graphics/test-cases/set-visible-range.js b/tests/e2e/graphics/test-cases/set-visible-range.js
index d5bc1f271..b228bc2ca 100644
--- a/tests/e2e/graphics/test-cases/set-visible-range.js
+++ b/tests/e2e/graphics/test-cases/set-visible-range.js
@@ -1,7 +1,7 @@
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 1000; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 1000; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -12,10 +12,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addLineSeries();
+	var mainSeries = chart.addLineSeries();
 
 	mainSeries.setData(generateData());
 
diff --git a/tests/e2e/graphics/test-cases/take-screenshot.js b/tests/e2e/graphics/test-cases/take-screenshot.js
index 5d7bbd4db..bc7f99221 100644
--- a/tests/e2e/graphics/test-cases/take-screenshot.js
+++ b/tests/e2e/graphics/test-cases/take-screenshot.js
@@ -1,6 +1,6 @@
 function generateBar(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 	target.open = base;
 	target.high = base * (1 + 2 * step);
 	target.low = base * (1 - 2 * step);
@@ -8,10 +8,10 @@ function generateBar(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -23,15 +23,15 @@ function generateData() {
 }
 
 function generateDataHist() {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -43,8 +43,9 @@ function generateDataHist() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		timeScale: {
 			barSpacing: 20,
 		},
@@ -53,14 +54,14 @@ function runTestCase(container) {
 		},
 	});
 
-	const mainSeries = chart.addCandlestickSeries({
+	var mainSeries = chart.addCandlestickSeries({
 		drawBorder: true,
 		borderColor: 'blue',
 	});
 
 	mainSeries.setData(generateData());
 
-	const histSeries = chart.addHistogramSeries({
+	var histSeries = chart.addHistogramSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
@@ -77,10 +78,10 @@ function runTestCase(container) {
 	// create canvas to draw screenshot
 	chart.resize(600, 240, true);
 
-	const screenshot = chart.takeScreenshot();
+	var screenshot = chart.takeScreenshot();
 	screenshot.style.position = 'absolute';
 	screenshot.style.top = '260px';
 
-	const parent = container.parentNode;
+	var parent = container.parentNode;
 	parent.appendChild(screenshot);
 }
diff --git a/tests/e2e/graphics/test-cases/two-scales/basic.js b/tests/e2e/graphics/test-cases/two-scales/basic.js
index dbd2456f3..bedd14579 100644
--- a/tests/e2e/graphics/test-cases/two-scales/basic.js
+++ b/tests/e2e/graphics/test-cases/two-scales/basic.js
@@ -1,8 +1,8 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 
-	const sign = (i % 2) ? 1 : -1;
+	var sign = (i % 2) ? 1 : -1;
 	target.open = base * (1 - sign * step);
 	target.high = base * (1 + 4 * step);
 	target.low = base * (1 - 4 * step);
@@ -10,10 +10,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -25,15 +25,15 @@ function generateData() {
 }
 
 function generateDataHist() {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -45,14 +45,15 @@ function generateDataHist() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		leftPriceScale: {
 			visible: true,
 		},
 	});
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		borderColor: 'rgba(0, 0, 255, 0.2)',
 		upColor: 'rgba(0, 80, 0, 0.4)',
 		downColor: 'rgba(80, 0, 0, 0.4)',
@@ -62,7 +63,7 @@ function runTestCase(container) {
 
 	mainSeries.setData(generateData());
 
-	const histSeries = chart.addHistogramSeries({
+	var histSeries = chart.addHistogramSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
diff --git a/tests/e2e/graphics/test-cases/two-scales/empty-price-scale-id.js b/tests/e2e/graphics/test-cases/two-scales/empty-price-scale-id.js
index 9b95cde6e..08095d425 100644
--- a/tests/e2e/graphics/test-cases/two-scales/empty-price-scale-id.js
+++ b/tests/e2e/graphics/test-cases/two-scales/empty-price-scale-id.js
@@ -1,8 +1,8 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 
-	const sign = (i % 2) ? 1 : -1;
+	var sign = (i % 2) ? 1 : -1;
 	target.open = base * (1 - sign * step);
 	target.high = base * (1 + 4 * step);
 	target.low = base * (1 - 4 * step);
@@ -10,10 +10,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -25,15 +25,15 @@ function generateData() {
 }
 
 function generateDataLine(offset) {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: (offset || 0) + i,
@@ -45,10 +45,11 @@ function generateDataLine(offset) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		borderColor: 'rgba(0, 0, 255, 0.2)',
 		upColor: 'rgba(0, 80, 0, 0.4)',
 		downColor: 'rgba(80, 0, 0, 0.4)',
@@ -58,7 +59,7 @@ function runTestCase(container) {
 
 	mainSeries.setData(generateData());
 
-	const lineSeires1 = chart.addLineSeries({
+	var lineSeires1 = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
@@ -68,7 +69,7 @@ function runTestCase(container) {
 
 	lineSeires1.setData(generateDataLine());
 
-	const lineSeires2 = chart.addLineSeries({
+	var lineSeires2 = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
diff --git a/tests/e2e/graphics/test-cases/two-scales/left-percent.js b/tests/e2e/graphics/test-cases/two-scales/left-percent.js
index 8eeba2366..9c68c646e 100644
--- a/tests/e2e/graphics/test-cases/two-scales/left-percent.js
+++ b/tests/e2e/graphics/test-cases/two-scales/left-percent.js
@@ -1,8 +1,8 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 
-	const sign = (i % 2) ? 1 : -1;
+	var sign = (i % 2) ? 1 : -1;
 	target.open = base * (1 - sign * step);
 	target.high = base * (1 + 4 * step);
 	target.low = base * (1 - 4 * step);
@@ -10,10 +10,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -25,15 +25,15 @@ function generateData() {
 }
 
 function generateDataHist() {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: i,
@@ -45,14 +45,15 @@ function generateDataHist() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container, {
+	var chart = LightweightCharts.createChart(container, {
 		leftPriceScale: {
 			visible: true,
 		},
 	});
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		borderColor: 'rgba(0, 0, 255, 0.2)',
 		upColor: 'rgba(0, 80, 0, 0.4)',
 		downColor: 'rgba(80, 0, 0, 0.4)',
@@ -62,7 +63,7 @@ function runTestCase(container) {
 
 	mainSeries.setData(generateData());
 
-	const histSeries = chart.addHistogramSeries({
+	var histSeries = chart.addHistogramSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
diff --git a/tests/e2e/graphics/test-cases/two-scales/two-groups-of-overlays.js b/tests/e2e/graphics/test-cases/two-scales/two-groups-of-overlays.js
index b6e076366..86df72c91 100644
--- a/tests/e2e/graphics/test-cases/two-scales/two-groups-of-overlays.js
+++ b/tests/e2e/graphics/test-cases/two-scales/two-groups-of-overlays.js
@@ -1,8 +1,8 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 
-	const sign = (i % 2) ? 1 : -1;
+	var sign = (i % 2) ? 1 : -1;
 	target.open = base * (1 - sign * step);
 	target.high = base * (1 + 4 * step);
 	target.low = base * (1 - 4 * step);
@@ -10,10 +10,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -25,15 +25,15 @@ function generateData() {
 }
 
 function generateDataLine(offset) {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: (offset || 0) + i,
@@ -45,10 +45,11 @@ function generateDataLine(offset) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		borderColor: 'rgba(0, 0, 255, 0.2)',
 		upColor: 'rgba(0, 80, 0, 0.4)',
 		downColor: 'rgba(80, 0, 0, 0.4)',
@@ -58,7 +59,7 @@ function runTestCase(container) {
 
 	mainSeries.setData(generateData());
 
-	const lineSeires1 = chart.addLineSeries({
+	var lineSeires1 = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
@@ -68,7 +69,7 @@ function runTestCase(container) {
 
 	lineSeires1.setData(generateDataLine());
 
-	const lineSeires2 = chart.addLineSeries({
+	var lineSeires2 = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#0000ff',
 		priceLineWidth: 1,
@@ -78,7 +79,7 @@ function runTestCase(container) {
 
 	lineSeires2.setData(generateDataLine(50));
 
-	const lineSeires3 = chart.addLineSeries({
+	var lineSeires3 = chart.addLineSeries({
 		lineWidth: 5,
 		color: '#ff00ff',
 		priceLineWidth: 1,
@@ -88,7 +89,7 @@ function runTestCase(container) {
 
 	lineSeires3.setData(generateDataLine(90));
 
-	const lineSeires4 = chart.addLineSeries({
+	var lineSeires4 = chart.addLineSeries({
 		lineWidth: 5,
 		color: '#00ffff',
 		priceLineWidth: 1,
diff --git a/tests/e2e/graphics/test-cases/two-scales/two-overlays-share-scale.js b/tests/e2e/graphics/test-cases/two-scales/two-overlays-share-scale.js
index 541513f69..63f774f2b 100644
--- a/tests/e2e/graphics/test-cases/two-scales/two-overlays-share-scale.js
+++ b/tests/e2e/graphics/test-cases/two-scales/two-overlays-share-scale.js
@@ -1,8 +1,8 @@
 function generateCandle(i, target) {
-	const step = (i % 20) / 5000;
-	const base = i / 5;
+	var step = (i % 20) / 5000;
+	var base = i / 5;
 
-	const sign = (i % 2) ? 1 : -1;
+	var sign = (i % 2) ? 1 : -1;
 	target.open = base * (1 - sign * step);
 	target.high = base * (1 + 4 * step);
 	target.low = base * (1 - 4 * step);
@@ -10,10 +10,10 @@ function generateCandle(i, target) {
 }
 
 function generateData() {
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
-		const item = {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
+		var item = {
 			time: time.getTime() / 1000,
 		};
 		time.setUTCDate(time.getUTCDate() + 1);
@@ -25,15 +25,15 @@ function generateData() {
 }
 
 function generateDataLine(offset) {
-	const colors = [
+	var colors = [
 		'#013370',
 		'#3a9656',
 		undefined, // default color should be used
 	];
 
-	const res = [];
-	const time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 0));
+	for (var i = 0; i < 500; ++i) {
 		res.push({
 			time: time.getTime() / 1000,
 			value: (offset || 0) + i,
@@ -45,10 +45,11 @@ function generateDataLine(offset) {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addBarSeries({
+	var mainSeries = chart.addBarSeries({
 		borderColor: 'rgba(0, 0, 255, 0.2)',
 		upColor: 'rgba(0, 80, 0, 0.4)',
 		downColor: 'rgba(80, 0, 0, 0.4)',
@@ -58,7 +59,7 @@ function runTestCase(container) {
 
 	mainSeries.setData(generateData());
 
-	const lineSeires1 = chart.addLineSeries({
+	var lineSeires1 = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#ff0000',
 		priceLineWidth: 1,
@@ -68,7 +69,7 @@ function runTestCase(container) {
 
 	lineSeires1.setData(generateDataLine());
 
-	const lineSeires2 = chart.addLineSeries({
+	var lineSeires2 = chart.addLineSeries({
 		lineWidth: 1,
 		color: '#0000ff',
 		priceLineWidth: 1,
diff --git a/tests/e2e/memleaks/test-cases/.eslintrc.js b/tests/e2e/memleaks/test-cases/.eslintrc.js
index e3465446c..24863e508 100644
--- a/tests/e2e/memleaks/test-cases/.eslintrc.js
+++ b/tests/e2e/memleaks/test-cases/.eslintrc.js
@@ -5,7 +5,7 @@ module.exports = {
 		node: false,
 	},
 	rules: {
-		'no-unused-vars': ['error', { varsIgnorePattern: 'runTestCase', args: 'none' }],
+		'no-var': 'off',
 	},
 	globals: {
 		LightweightCharts: false,
diff --git a/tests/e2e/memleaks/test-cases/simple.js b/tests/e2e/memleaks/test-cases/simple.js
index 6c5673fa3..c3a8de082 100644
--- a/tests/e2e/memleaks/test-cases/simple.js
+++ b/tests/e2e/memleaks/test-cases/simple.js
@@ -1,5 +1,5 @@
 function nextBusinessDay(time) {
-	const d = new Date();
+	var d = new Date();
 	d.setUTCFullYear(time.year);
 	d.setUTCMonth(time.month - 1);
 	d.setUTCDate(time.day + 1);
@@ -12,7 +12,7 @@ function nextBusinessDay(time) {
 }
 
 function businessDayToTimestamp(time) {
-	const d = new Date();
+	var d = new Date();
 	d.setUTCFullYear(time.year);
 	d.setUTCMonth(time.month - 1);
 	d.setUTCDate(time.day);
@@ -21,9 +21,9 @@ function businessDayToTimestamp(time) {
 }
 
 function generateData() {
-	const res = [];
-	let time = nextBusinessDay({ day: 1, month: 1, year: 2018 });
-	for (let i = 0; i < 500; ++i) {
+	var res = [];
+	var time = nextBusinessDay({ day: 1, month: 1, year: 2018 });
+	for (var i = 0; i < 500; ++i) {
 		time = nextBusinessDay(time);
 		res.push({
 			time: businessDayToTimestamp(time),
@@ -33,10 +33,11 @@ function generateData() {
 	return res;
 }
 
+// eslint-disable-next-line no-unused-vars
 function runTestCase(container) {
-	const chart = LightweightCharts.createChart(container);
+	var chart = LightweightCharts.createChart(container);
 
-	const mainSeries = chart.addAreaSeries();
+	var mainSeries = chart.addAreaSeries();
 
 	mainSeries.setData(generateData());
 	return chart;
diff --git a/tests/unittests/text-width-cache.spec.ts b/tests/unittests/text-width-cache.spec.ts
new file mode 100644
index 000000000..8e89a52a0
--- /dev/null
+++ b/tests/unittests/text-width-cache.spec.ts
@@ -0,0 +1,130 @@
+import { expect } from 'chai';
+import { describe, it } from 'mocha';
+
+import { CanvasCtxLike, TextWidthCache } from '../../src/model/text-width-cache';
+
+class FakeCtx implements CanvasCtxLike {
+	public readonly invocations: string[] = [];
+
+	public measureText(text: string): TextMetrics {
+		this.invocations.push(text);
+		return { width: this._impl(text) } as unknown as TextMetrics;
+	}
+
+	protected _impl(text: string): number {
+		let fakeWidth = 0;
+		for (let i = 0; i < text.length; i++) {
+			fakeWidth += (1 + text.charCodeAt(i) % 64 / 64) * 10;
+		}
+		return fakeWidth;
+	}
+}
+
+describe('TextWidthCache', () => {
+	it('should return the same measureText would return', () => {
+		const textWidthCache = new TextWidthCache();
+		const fakeCtx = new FakeCtx();
+
+		expect(
+			textWidthCache.measureText(fakeCtx, 'test')
+		).to.be.equal(
+			fakeCtx.measureText('test').width
+		);
+	});
+
+	it('should cache and purge values', () => {
+		const textWidthCache = new TextWidthCache(3);
+		const fakeCtx = new FakeCtx();
+
+		textWidthCache.measureText(fakeCtx, 'foo');
+		textWidthCache.measureText(fakeCtx, 'bar');
+		textWidthCache.measureText(fakeCtx, 'baz');
+
+		expect(fakeCtx.invocations).to.deep.equal(['foo', 'bar', 'baz']);
+
+		textWidthCache.measureText(fakeCtx, 'baz');
+		textWidthCache.measureText(fakeCtx, 'bar');
+		textWidthCache.measureText(fakeCtx, 'foo');
+
+		// No new invocations should be made
+		expect(fakeCtx.invocations).to.deep.equal(['foo', 'bar', 'baz']);
+
+		// The oldest, foo, should be removed
+		textWidthCache.measureText(fakeCtx, 'quux');
+		expect(fakeCtx.invocations).to.deep.equal(['foo', 'bar', 'baz', 'quux']);
+
+		textWidthCache.measureText(fakeCtx, 'baz');
+		textWidthCache.measureText(fakeCtx, 'bar');
+		expect(fakeCtx.invocations).to.deep.equal(['foo', 'bar', 'baz', 'quux']);
+
+		textWidthCache.measureText(fakeCtx, 'foo');
+		expect(fakeCtx.invocations).to.deep.equal(['foo', 'bar', 'baz', 'quux', 'foo']);
+	});
+
+	it('should not cache zero width of nonempty string', () => {
+		class ZeroReturningFakeCtx extends FakeCtx {
+			protected _impl(): number {
+				return 0;
+			}
+		}
+
+		const textWidthCache = new TextWidthCache(3);
+		const fakeCtx = new ZeroReturningFakeCtx();
+
+		textWidthCache.measureText(fakeCtx, '');
+		textWidthCache.measureText(fakeCtx, 'not empty');
+		expect(fakeCtx.invocations).to.deep.equal(['', 'not empty']);
+
+		textWidthCache.measureText(fakeCtx, '');
+		textWidthCache.measureText(fakeCtx, 'not empty');
+		expect(fakeCtx.invocations).to.deep.equal(['', 'not empty', 'not empty']);
+
+		textWidthCache.measureText(fakeCtx, '');
+		textWidthCache.measureText(fakeCtx, 'not empty');
+		expect(fakeCtx.invocations).to.deep.equal(['', 'not empty', 'not empty', 'not empty']);
+	});
+
+	it('should work with "special" values', () => {
+		const textWidthCache = new TextWidthCache(5);
+		const fakeCtx = new FakeCtx();
+
+		textWidthCache.measureText(fakeCtx, '__proto__');
+		textWidthCache.measureText(fakeCtx, 'prototype');
+		textWidthCache.measureText(fakeCtx, 'hasOwnProperty');
+		textWidthCache.measureText(fakeCtx, 'undefined');
+
+		expect(fakeCtx.invocations).to.deep.equal(['__proto__', 'prototype', 'hasOwnProperty', 'undefined']);
+
+		// Just checking if it still works
+
+		textWidthCache.measureText(fakeCtx, '__proto__');
+		textWidthCache.measureText(fakeCtx, 'prototype');
+		textWidthCache.measureText(fakeCtx, 'hasOwnProperty');
+		textWidthCache.measureText(fakeCtx, 'undefined');
+
+		expect(fakeCtx.invocations).to.deep.equal(['__proto__', 'prototype', 'hasOwnProperty', 'undefined']);
+	});
+
+	it('should apply default optimization regex', () => {
+		const textWidthCache = new TextWidthCache();
+		const fakeCtx = new FakeCtx();
+		expect(
+			textWidthCache.measureText(fakeCtx, 'test2345')
+		).to.be.equal(
+			textWidthCache.measureText(fakeCtx, 'test6789')
+		);
+		expect(fakeCtx.invocations).to.deep.equal(['test0000']);
+	});
+
+	it('should apply custom optimization regex', () => {
+		const textWidthCache = new TextWidthCache();
+		const fakeCtx = new FakeCtx();
+		const re = /[1-9]/g;
+		expect(
+			textWidthCache.measureText(fakeCtx, 'test01234', re)
+		).to.be.equal(
+			textWidthCache.measureText(fakeCtx, 'test56789', re)
+		);
+		expect(fakeCtx.invocations).to.deep.equal(['test00000']);
+	});
+});