From 7f14f2c523a806d59ea32f80624fa9bf2a3a4033 Mon Sep 17 00:00:00 2001 From: Ozimek Date: Mon, 13 Mar 2017 23:08:44 +0100 Subject: [PATCH 1/4] updating highmaps --- highcharts/modules/map/index.d.ts | 57 +++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/highcharts/modules/map/index.d.ts b/highcharts/modules/map/index.d.ts index 9818729a62..d5945ddbf7 100644 --- a/highcharts/modules/map/index.d.ts +++ b/highcharts/modules/map/index.d.ts @@ -3,11 +3,64 @@ // Definitions by: Albert Ozimek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -import { Static } from 'highcharts'; +import * as highcharts from 'highcharts'; +import * as geojson from 'geojson'; declare module 'highcharts' { export interface Static { - mapChart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; + mapChart(renderTo: string | HTMLElement, options: MapOptions, callback?: (chart: highcharts.ChartObject) => void): highcharts.ChartObject; + } + + export interface MapOptions { + chart?: highcharts.ChartOptions; + + legend?: highcharts.LegendOptions; + + mapNavigation?: Navigation; + + series?: MapSeriesOptions[]; + + colorAxis?: ColorAxis; + + title?: highcharts.TitleOptions; + } + + interface MapSeriesOptions { + data?: number[] | [number, number][] | [string, number][] | highcharts.DataPoint[]; + + dataLabels?: MapSeriesOptionsDataLabels; + + joinBy?: Array; + + mapData?: geojson.GeoJsonObject; + + name?: string; + + states?: MapSeriesOptionsStates; + + tooltip?: MapSeriesOptionsTooltip; + + type?: string; + } + + export interface Navigation { + + } + + export interface MapSeriesOptionsDataLabels { + + } + + export interface MapSeriesOptionsStates { + + } + + export interface MapSeriesOptionsTooltip { + + } + + export interface ColorAxis { + } } From 71435511a4abb5dc2e01bff8ca314c368cb7f59b Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Wed, 22 Mar 2017 16:38:54 -0700 Subject: [PATCH 2/4] Fix linter issues --- highcharts/index.d.ts | 109 ++++++++++++++------ highcharts/test/highstock.ts | 4 +- highcharts/test/index.ts | 188 +++++++++++++++++------------------ 3 files changed, 172 insertions(+), 129 deletions(-) diff --git a/highcharts/index.d.ts b/highcharts/index.d.ts index 968b5975fb..1885d5940f 100644 --- a/highcharts/index.d.ts +++ b/highcharts/index.d.ts @@ -530,7 +530,9 @@ declare namespace Highcharts { */ gridLineColor?: string; /** - * The dash or dot style of the grid lines. For possible values, see {@http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. Defaults to Solid. + * The dash or dot style of the grid lines. For possible values, + * see {@http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. + * Defaults to Solid. * @since 1.2 */ gridLineDashStyle?: string; @@ -627,7 +629,8 @@ declare namespace Highcharts { */ minorGridLineColor?: string; /** - * The dash or dot style of the minor grid lines. For possible values, see {@link http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. + * The dash or dot style of the minor grid lines. For possible values, + * see {@link http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/|this demonstration}. * @default 'Solid' */ minorGridLineDashStyle?: string; @@ -5738,7 +5741,8 @@ declare namespace Highcharts { * @param {number} min The new minimum value * @param {number} max The new maximum value * @param {boolean} redraw Whether to redraw the chart or wait for an explicit call to chart.redraw(). - * @param {boolean | Animation} animation When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {boolean | Animation} animation When true, the resize will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ setExtremes(min?: number, max?: number, redraw?: boolean, animation?: boolean | Animation, eventArguments?: any): void; @@ -5788,7 +5792,8 @@ declare namespace Highcharts { * @param {AxisOptions} options The Axis options, as documented under xAxis and yAxis. * @param [boolean] isX Whether it is an X axis or Y axis * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the series is added. See the redraw() method. - * @param [boolean | Animation] animation Defaults to true. When true, the series' updating will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean | Animation] animation Defaults to true. When true, the series' updating will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @return {AxisObject} * @since 3.0 */ @@ -5836,14 +5841,20 @@ declare namespace Highcharts { /** * Exporting module required. Submit an SVG version of the chart to a server along with some parameters for * conversion. - * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options. filename: the filename for the export without extension, url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. + * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. + * All options default to the values given in the exporting config options. filename: the filename for the export without extension, + * url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, + * type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. * @since 2.0 */ exportChart(options: ExportingOptions): void; /** * Exporting module required. Submit an SVG version of the chart to a server along with some parameters for * conversion. - * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. All options default to the values given in the exporting config options. filename: the filename for the export without extension, url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. + * @param {ExportingOptions} options Exporting options. Out of the exporting options, the following options can be given as parameters to the exportChart method. + * All options default to the values given in the exporting config options. filename: the filename for the export without extension, + * url: the URL for the server module to do the conversion, width: the width of the PNG or JPEG image generated on the server, + * type: the MIME type of the converted image, sourceWidth: the width of the source (in-page) chart, sourceHeight: the height of the source chart. * @param {Options} chartOptions Additional chart options for the exported chart. For example a different background color can be added here. * @since 2.0 */ @@ -5881,7 +5892,8 @@ declare namespace Highcharts { get(id: string): AxisObject | SeriesObject | PointObject; /** * Exporting module required. Get an SVG string representing the chart. - * @param {Options} additionalOptions Chart options to add to the exported chart in addition to the options given for the original chart. For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here. + * @param {Options} additionalOptions Chart options to add to the exported chart in addition to the options given for the original chart. + * For example if series.lineWidth should be greater in the exported chart than in the original, or the chart should have a different background color, this is added here. * @return {string} * @since 2.0 */ @@ -5922,7 +5934,8 @@ declare namespace Highcharts { * more than one operation on the chart before redrawing, for example add a number of points. In those cases it is a * waste of resources to redraw the chart for each new point added. So you add the points and call chart.redraw() * after. - * @param [boolean | Animation] animation Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean | Animation] animation Defaults to true. When true, the update will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ redraw(animation?: boolean | Animation): void; @@ -5942,7 +5955,8 @@ declare namespace Highcharts { * Resize the chart to a given width and height. * @param {number} width The new pixel width of the chart. * @param {number} height The new pixel height of the chart. - * @param {boolean | Animation} animation Defaults to true. When true, the resize will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {boolean | Animation} animation Defaults to true. When true, the resize will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. */ setSize(width: number, height: number, animation?: boolean | Animation): void; /** @@ -6004,7 +6018,10 @@ declare namespace Highcharts { /** * This is the constructor for creating a new chart object. * @param {Options} options The chart options - * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, + * but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, + * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). + * s a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. * @return {ChartObject} */ new (options: Options, callback: (chart: ChartObject) => void): ChartObject; @@ -6019,7 +6036,10 @@ declare namespace Highcharts { * This is the constructor for creating a new chart object. * @param {string|HTMLElement} renderTo The id or a reference to a DOM element where the chart should be rendered (since v4.2.0). * @param {Options} options The chart options - * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. + * @param callback A function to execute when the chart object is finished loading and rendering. In most cases the chart is built in one thread, + * but in Internet Explorer version 8 or less the chart is sometimes initiated before the document is ready, + * and in these cases the chart object will not be finished directly after callingnew Highcharts.Chart(). + * As a consequence, code that relies on the newly built Chart object should always run in the callback. Defining a chart.event.load handler is equivalent. * @return {ChartObject} */ new (renderTo: string | HTMLElement, options: Options, callback: (chart: ChartObject) => void): ChartObject; @@ -6042,7 +6062,8 @@ declare namespace Highcharts { * Apply numeric attributes to the SVG/VML element by animation. See Element.attr() for more information on setting * attributes. * @param {any} attributes A set of attributes to apply. - * @param {any} animation Optional animation parameters that are passed over to jQuery or other framework. Valid properties depend on the library, but options like duration, easing and complete are supported by jQuery. + * @param {any} animation Optional animation parameters that are passed over to jQuery or other framework. + * Valid properties depend on the library, but options like duration, easing and complete are supported by jQuery. * @return {ElementObject} * @since 2.0 */ @@ -6131,7 +6152,8 @@ declare namespace Highcharts { circle(centerX: number, centerY: number, radius: number): ElementObject; /** * Add an SVG/VML group. - * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. Other Element objects are added to the group by using the group as the first parameter in .add() for the wrappers + * @param [string] name The name of the group. This will be used in the class name, which will be 'highcharts-'+ name. + * Other Element objects are added to the group by using the group as the first parameter in .add() for the wrappers * @return {ElementObject} * @since 2.0 */ @@ -6159,7 +6181,8 @@ declare namespace Highcharts { * @param [number] anchorX If the shape has a pointer, like the chevron on a callout shape, anchorX is the x position to point to. * @param [number] anchorY If the shape has a pointer, like the chevron on a callout shape, anchorY is the y position to point to. * @param [boolean] useHTML Use HTML to render the text of the label. - * @param [boolean] baseline Whether the label should be vertically aligned by the text baseline, which makes it behave like the text element, or by the top left side, which makes it behave like a HTML div. + * @param [boolean] baseline Whether the label should be vertically aligned by the text baseline, which makes it behave like the text element, + * or by the top left side, which makes it behave like a HTML div. * @param [string] className A class name for the g element surrounding the label. * @return {ElementObject} * @since 2.0 @@ -6286,15 +6309,18 @@ declare namespace Highcharts { percentage: number; /** * Remove the point from the series. - * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is removed.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param [boolean|Animation] animation Defaults to true. When true, the graph's updating will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is removed.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean|Animation] animation Defaults to true. When true, the graph's updating will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ remove(redraw?: boolean, animation?: boolean | Animation): void; /** * Select or unselect the point. * @param [boolean] select When true, the point is selected. When false, the point is unselected. When null or undefined, the selection state is toggled. - * @param [boolean] accumulate When true, the selection is added to other selected points. When false, other selected points are deselected. Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point. + * @param [boolean] accumulate When true, the selection is added to other selected points. When false, other selected points are deselected. + * Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point. * @since 1.2.0 */ select(select?: boolean, accumulate?: boolean): void; @@ -6313,7 +6339,8 @@ declare namespace Highcharts { * is selected. * @param [boolean] sliced When true, the point is sliced out. When false, the point is set in. When null or undefined, the sliced state is toggled. * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is altered. - * @param [boolean|Animation] animation Defaults to true. When true, the move will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean|Animation] animation Defaults to true. When true, the move will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ slice(sliced?: boolean, redraw?: boolean, animation?: boolean | Animation): void; @@ -6323,9 +6350,13 @@ declare namespace Highcharts { total: number; /** * Update the point with new values. - * @param {number|[number,number]|DataPoint} options The point options. Point options are handled as described under the series.data item for each series type. For example for a line series, if options is a single number, the point will be given that number as the main y value. If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options are applied. - * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is updated.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param {boolean|Animation} animation Defaults to true. When true, the update will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param {number|[number,number]|DataPoint} options The point options. Point options are handled as described under the series.data item for each series type. + * For example for a line series, if options is a single number, the point will be given that number as the main y value. If it is an array, + * it will be interpreted as x and y values respectively. If it is an object, advanced options are applied. + * @param [boolean] redraw Defaults to true. Whether to redraw the chart after the point is updated.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param {boolean|Animation} animation Defaults to true. When true, the update will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 1.2.0 */ update(options: number | [number, number] | DataPoint, redraw?: boolean, animation?: boolean | Animation): void; @@ -6359,10 +6390,14 @@ declare namespace Highcharts { /** * Add a point to the series after render time. The point can be added at the end, or by giving it an X value, to * the start or in the middle of the series. - * @param {number|[number,number]|DataPoint} The point options. If options is a single number, a point with that y value is appended to the series.If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options as outlined under series.data are applied. - * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. - * @param [boolean=false] shift - When shift is true, one point is shifted off the start of the series as one is appended to the end. Use this option for live charts monitoring a value over time. - * @param [(boolean|Animation)=false] animation - When shift is true, one point is shifted off the start of the series as one is appended to the end. Use this option for live charts monitoring a value over time. + * @param {number|[number,number]|DataPoint} The point options. If options is a single number, a point with that y value is appended to the series. + * If it is an array, it will be interpreted as x and y values respectively. If it is an object, advanced options as outlined under series.data are applied. + * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, + * it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. + * @param [boolean=false] shift - When shift is true, one point is shifted off the start of the series as one is appended to the end. + * Use this option for live charts monitoring a value over time. + * @param [(boolean|Animation)=false] animation - When shift is true, one point is shifted off the start of the series as one is appended to the end. + * Use this option for live charts monitoring a value over time. * @since 1.2.0 */ addPoint(options: number | [number, number] | DataPoint, redraw?: boolean, shift?: boolean, animation?: boolean | Animation): void; @@ -6394,7 +6429,8 @@ declare namespace Highcharts { options: IndividualSeriesOptions; /** * Remove the series from the chart. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is removed.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is removed.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ remove(redraw?: boolean): void; @@ -6402,8 +6438,10 @@ declare namespace Highcharts { * Remove a point from the series. Unlike the Point.remove method, this can also be done on a point that is not * instanciated because it is outside the view or subject to data grouping. * @param {number} index - The index of the point in the data array. - * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. - * @param [boolean|Animation=true] animation - When true, the graph will be animated with default animation options. The animation can also be a configuration object with properties duration and easing. + * @param [boolean=true] redraw - Whether to redraw the chart after the point is added. When adding more than one point, + * it is highly recommended that the redraw option be set to false, and instead chart.redraw() is explicitly called after the adding of points is finished. + * @param [boolean|Animation=true] animation - When true, the graph will be animated with default animation options. + * The animation can also be a configuration object with properties duration and easing. * @since 4.1.0 */ removePoint(index: number, redraw?: boolean, animation?: boolean | Animation): void; @@ -6423,16 +6461,20 @@ declare namespace Highcharts { * Apply a new set of data to the series and optionally redraw it. Note that this method throws away all points and * creates new ones. For updating the values of existing points, use Point.update() instead. * @param {number[]|number[][]|DataPoint[]} data - Takes an array of data in the same format as described under seriesdata for the given series type. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. - * @param [boolean|Animation] animation - When the updated data is the same length as the existing data, points will be updated by default, and animation visualizes how the points are changed. Set false to disable animation, or a configuration object to set duration or easing. - * @param [boolean] updatePoints - When the updated data is the same length as the existing data, points will be updated instead of replace. This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean|Animation] animation - When the updated data is the same length as the existing data, points will be updated by default, + * and animation visualizes how the points are changed. Set false to disable animation, or a configuration object to set duration or easing. + * @param [boolean] updatePoints - When the updated data is the same length as the existing data, points will be updated instead of replace. + * This option prevents this, and makes setData behave like it did prior to Highcharts 3.0.10. * @since 1.2.0 */ setData(data: number[] | number[][] | DataPoint[], redraw?: boolean, animation?: boolean | Animation, updatePoints?: boolean): void; /** * A utility function to show or hide the series with an optional redraw. * @param [boolean] visible - Whether to show or hide the series. If undefined, the visibility is toggled. - * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean=true] redraw - Whether to redraw the chart after the series is altered.If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ setVisible(visible?: boolean, redraw?: boolean): void; @@ -6451,7 +6493,8 @@ declare namespace Highcharts { * elements from the series is removed, and it is initiated from scratch. Therefore, this method is more performance * expensive than some other utility methods like setData or setVisible. * @param {IndividualSeriesOptions} options New options that will be merged into the series' existing options. - * @param [boolean] redraw - Whether to redraw the chart after the series is altered. If doing more operations on the chart, it is a good idea to set redraw to false and call chart.redraw() after. + * @param [boolean] redraw - Whether to redraw the chart after the series is altered. If doing more operations on the chart, + * it is a good idea to set redraw to false and call chart.redraw() after. * @since 1.2.0 */ update(options: IndividualSeriesOptions, redraw?: boolean): void; diff --git a/highcharts/test/highstock.ts b/highcharts/test/highstock.ts index ac7cb883f2..f4ba041caa 100644 --- a/highcharts/test/highstock.ts +++ b/highcharts/test/highstock.ts @@ -3,7 +3,7 @@ import * as Highcharts from "highcharts"; var someData = [1, 2, 3, 4, 5, 6, 7, 8, 9]; -$(function () { +$(() => { $('#container').highcharts('StockChart', { chart: { @@ -55,7 +55,7 @@ $(function () { } }, - series: [{ + series: [ { name: 'USD to EUR', data: someData, lineColor: "blue" diff --git a/highcharts/test/index.ts b/highcharts/test/index.ts index 316e2f42a6..6e1cc2d658 100644 --- a/highcharts/test/index.ts +++ b/highcharts/test/index.ts @@ -219,7 +219,7 @@ function test_ChartOptions() { duration: 500, easing: "linear" }, - backgroundColor: { + backgroundColor: { linearGradient: { x1: 0, y1: 0, @@ -233,16 +233,16 @@ function test_ChartOptions() { borderWidth: 5, className: "class", defaultSeriesType: "deprecated", - events: { - addSeries: () => {}, - afterPrint: () => {}, - beforePrint: () => {}, - click: () => {}, - drilldown: () => {}, - drillup: () => {}, - load: () => {}, - redraw: () => {}, - selection: () => {} + events: { + addSeries: () => { }, + afterPrint: () => { }, + beforePrint: () => { }, + click: () => { }, + drilldown: () => { }, + drillup: () => { }, + load: () => { }, + redraw: () => { }, + selection: () => { } }, height: 200, ignoreHiddenSeries: true, @@ -252,21 +252,21 @@ function test_ChartOptions() { marginLeft: 10, marginRight: 10, marginTop: 10, - options3d: { + options3d: { alpha: 20, beta: 20, depth: 50, enabled: true, frame: { - back: { + back: { color: "black", size: 2 }, - bottom: { + bottom: { color: "black", size: 2 }, - side: { + side: { color: "black", size: 2 } @@ -280,7 +280,7 @@ function test_ChartOptions() { plotBackgroundImage: "http://image.url/image.jpg", plotBorderColor: "grey", plotBorderWidth: 5, - plotShadow: { + plotShadow: { color: "magenta", offsetX: 10, offsetY: 10, @@ -290,15 +290,15 @@ function test_ChartOptions() { polar: true, reflow: false, renderTo: "elementId", - resetZoomButton: { - position: { + resetZoomButton: { + position: { align: "left", verticalAlign: "top", x: 5, y: 5 }, relativeTo: "chart", - theme: { + theme: { display: "hidden", fill: "black", stroke: "white", @@ -364,7 +364,7 @@ function test_ChartOptions() { }); // animation example - $('#container').highcharts( { + $('#container').highcharts({ chart: { animation: { duration: 1500, @@ -379,7 +379,7 @@ function test_ChartOptions() { }] }); var i = 1; - $('#update').click(function () { + $('#update').click(() => { var chart = $('#container').highcharts(); chart.series[0].data[0].update(i % 2 ? 200 : 0); i += 1; @@ -461,7 +461,7 @@ function test_ChartOptions() { }) .add(); - setTimeout(function () { + setTimeout(() => { label.fadeOut(); }, 1000); } @@ -476,7 +476,7 @@ function test_ChartOptions() { }); // activate the button - $('#button').click(function () { + $('#button').click(() => { var chart = $('#container').highcharts(); chart.addSeries({ @@ -631,10 +631,10 @@ function test_Data() { } }, series: [ - { + { lineWidth: 1 }, - { + { type: 'areaspline', color: '#c4392d', negativeColor: '#5679c4', @@ -645,7 +645,7 @@ function test_Data() { // limited data example $('#container').highcharts({ - data: { + data: { csv: document.getElementById('csv').innerHTML, startRow: 114, endRow: 134, @@ -655,7 +655,7 @@ function test_Data() { xAxis: { allowDecimals: false }, - series: [ { + series: [{ name: 'Annual mean' }] }); @@ -686,7 +686,7 @@ function test_Drilldown() { type: 'category' }, plotOptions: { - series: { + series: { borderWidth: 0, dataLabels: { enabled: true @@ -783,7 +783,7 @@ function test_Drilldown() { type: 'column' }, plotOptions: { - series: { + series: { borderWidth: 0, dataLabels: { enabled: true @@ -898,7 +898,7 @@ function test_Loading() { $button = $('#button'), chart: Highcharts.ChartObject; - $button.click(function () { + $button.click(() => { if (!isLoading) { chart.showLoading(); $button.html('Hide loading'); @@ -1011,7 +1011,7 @@ function test_AreaOptions() { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, plotOptions: { - series: { + series: { fillColor: { linearGradient: [0, 0, 0, 300], stops: [ @@ -1045,26 +1045,26 @@ function test_AreaRange() { zoomType: 'x' }, series: [{ - data: (function (arr: number[], len: number) { + data: (((arr: number[], len: number) => { var i: number; for (i = 0; i < len; i = i + 1) { arr.push(i); } return arr; - }([], 50)) + })([], 50)) }] }); - $('#setextremes').click(function () { + $('#setextremes').click(() => { $('#container').highcharts().xAxis[0].setExtremes(10, 15); }); - $('#unsetextremes').click(function () { + $('#unsetextremes').click(() => { $('#container').highcharts().xAxis[0].setExtremes(); }); // datalabels example - $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', function (data) { + $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=range.json&callback=?', (data) => { // Shorten the data data = data.splice(181, 14); $('#container').highcharts({ @@ -1090,7 +1090,7 @@ function test_AreaRange() { legend: { enabled: false }, - series: [ { + series: [{ name: 'Temperatures', data: data, dataLabels: { @@ -1115,7 +1115,7 @@ function test_Bar() { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, plotOptions: { - series: { + series: { borderColor: '#303030', borderRadius: 5, borderWidth: 2, @@ -1173,7 +1173,7 @@ function test_Bar() { }); // grouping example - Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color: string) { + Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, (color: string) => { return (Highcharts.Color(color)) .setOpacity(0.5) .get('rgba'); @@ -1209,19 +1209,19 @@ function test_Bar() { shadow: false } }, - series: [ { + series: [{ name: 'Tokyo', data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], pointPadding: 0 - }, { + }, { name: 'New York', data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3], pointPadding: 0.1 - }, { + }, { name: 'London', data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2], pointPadding: 0.2 - }, { + }, { name: 'Berlin', data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1], pointPadding: 0.3 @@ -1307,7 +1307,7 @@ function test_Bubble() { maxSize: 50 } }, - series: [ { + series: [{ data: [ [9, 81, 13], [98, 5, 39], @@ -1411,7 +1411,7 @@ function test_ErrorBar() { tooltip: { pointFormat: '{series.name}: {point.y:.1f}°C
' } - }, { + }, { color: '#FF0000', name: 'Temperature error', type: 'errorbar', @@ -1441,7 +1441,7 @@ function test_Funnel() { x: -50 }, plotOptions: { - series: { + series: { dataLabels: { enabled: true, format: '{point.name} ({point.y:,.0f})', @@ -1518,7 +1518,7 @@ function test_Gauge() { } } }, - series: [ { + series: [{ data: [80], overshoot: 5 }] @@ -1574,7 +1574,7 @@ function test_HeatMap() { ], min: -5 }, - series: [ { + series: [{ borderWidth: 0, colsize: 24 * 36e5, // one day tooltip: { @@ -1710,11 +1710,11 @@ function test_Pie() { name: 'Browser share', innerSize: '50%', data: [ - ['Firefox', 10.38], - ['IE', 56.33], + ['Firefox', 10.38], + ['IE', 56.33], ['Chrome', 24.03], - ['Safari', 4.77], - ['Opera', 0.91], + ['Safari', 4.77], + ['Opera', 0.91], { name: 'Proprietary or Undetectable', y: 0.2, @@ -1747,10 +1747,10 @@ function test_Pie() { selected: true, sliced: true }, - ['IE7', 26.6], - ['IE6', 20], - ['Chrome', 3.1], - ['Other', 5.4] + ['IE7', 26.6], + ['IE6', 20], + ['Chrome', 3.1], + ['Other', 5.4] ] }] }); @@ -1814,11 +1814,11 @@ function test_Pyramid() { series: [{ name: 'Unique users', data: [ - ['Website visits', 15654], - ['Downloads', 4064], + ['Website visits', 15654], + ['Downloads', 4064], ['Requested price list', 1987], - ['Invoice sent', 976], - ['Finalized', 846] + ['Invoice sent', 976], + ['Finalized', 846] ] }] }); @@ -1848,13 +1848,13 @@ function test_SolidGauge() { tooltip: { enabled: false }, - colorAxis: { - stops: [ + colorAxis: { + stops: [ [0.1, '#55BF3B'], // green [0.5, '#DDDF0D'], // yellow [0.9, '#DF5353'] // red ] - }, + }, yAxis: { lineWidth: 0, minorTickInterval: null, @@ -1996,10 +1996,10 @@ function test_AxisOptions() { }, endOnTick: false, events: { - afterBreaks: () => {}, - afterSetExtremes: () => {}, - pointBreak: () => {}, - setExtremes: () => {} + afterBreaks: () => { }, + afterSetExtremes: () => { }, + pointBreak: () => { }, + setExtremes: () => { } }, floor: 0, gridLineColor: '#111111', @@ -2014,7 +2014,7 @@ function test_AxisOptions() { distance: 10, enabled: true, format: "format", - formatter: function() { return this.value; }, + formatter: function () { return this.value; }, maxStaggerLines: 5, overflow: false, padding: 10, @@ -2050,10 +2050,10 @@ function test_AxisOptions() { borderWidth: 2, color: 'gray', events: { - click: () => {}, - mouseover: () => {}, - mouseout: () => {}, - mousemove: () => {} + click: () => { }, + mouseover: () => { }, + mouseout: () => { }, + mousemove: () => { } }, from: 0, id: 'plotband1', @@ -2078,10 +2078,10 @@ function test_AxisOptions() { color: '#000000', dashStyle: 'Solid', events: { - click: () => {}, - mouseover: () => {}, - mouseout: () => {}, - mousemove: () => {} + click: () => { }, + mouseover: () => { }, + mouseout: () => { }, + mousemove: () => { } }, id: 'plotline1', label: { @@ -2111,7 +2111,7 @@ function test_AxisOptions() { tickLength: 10, tickPixelInterval: 100, tickPosition: 'outside', - tickPositioner: () => {}, + tickPositioner: () => { }, tickPositions: [0, 1, 2], tickWidth: 1, tickmarkPlacement: 'between', @@ -2150,9 +2150,9 @@ function test_AxisObject() { axis.removePlotLine('plot-line-1'); var extremes = axis.getExtremes(); console.log('dataMax: ' + extremes.dataMax + '
' + - 'dataMin: ' + extremes.dataMin + '
' + - 'max: ' + extremes.max + '
' + - 'min: ' + extremes.min + '
'); + 'dataMin: ' + extremes.dataMin + '
' + + 'max: ' + extremes.max + '
' + + 'min: ' + extremes.min + '
'); axis.remove(); axis.remove(false); axis.setCategories(['A', 'B', 'C']); @@ -2161,9 +2161,9 @@ function test_AxisObject() { axis.setExtremes(10, 20); axis.setExtremes(10, 20, false); axis.setExtremes(10, 20, false, false); - axis.setExtremes(10, 20, false, {duration: 50}); - axis.setTitle({text: 'text'}); - axis.setTitle({text: 'text'}, false); + axis.setExtremes(10, 20, false, { duration: 50 }); + axis.setTitle({ text: 'text' }); + axis.setTitle({ text: 'text' }, false); axis.toPixels(10); axis.toPixels(10, true); axis.toValue(10); @@ -2178,11 +2178,11 @@ function test_ChartObject() { chart.addAxis({}, true); chart.addAxis({}, true, false); chart.addAxis({}, true, true, false); - chart.addAxis({}, true, true, {duration: 50}); + chart.addAxis({}, true, true, { duration: 50 }); chart.addSeries({}); chart.addSeries({}, false); chart.addSeries({}, false, false); - chart.addSeries({}, false, {duration: 50}); + chart.addSeries({}, false, { duration: 50 }); chart.addSeriesAsDrilldown({}, {}); var container = chart.container; console.log(container.id); @@ -2200,12 +2200,12 @@ function test_ChartObject() { chart.print(); chart.redraw(); chart.redraw(false); - chart.redraw({duration: 50, easing: 'fadeIn'}); + chart.redraw({ duration: 50, easing: 'fadeIn' }); chart.reflow(); var series = chart.series; chart.setSize(200, 200); chart.setSize(200, 200, false); - chart.setSize(200, 200, {duration: 50}); + chart.setSize(200, 200, { duration: 50 }); chart.setTitle({}, {}); chart.setTitle({}, {}, false); chart.showLoading(); @@ -2253,7 +2253,7 @@ function test_ElementObject() { }) .add(); var bbox = styledText.getBBox(); - styledText.on('click', () => {}); + styledText.on('click', () => { }); group.toFront(); } @@ -2264,7 +2264,7 @@ function test_PointObject() { point.index; point.remove(); point.remove(false); - point.remove(false, {duration: 50}); + point.remove(false, { duration: 50 }); point.select(); point.select(false); point.select(false, true); @@ -2274,14 +2274,14 @@ function test_PointObject() { point.slice(false); point.slice(false, false); point.slice(false, false, false); - point.slice(false, false, {duration: 50}); + point.slice(false, false, { duration: 50 }); var total = point.total; point.update(0); point.update([0, 0]); point.update({}); point.update({}, false); point.update({}, false, false); - point.update({}, false, {duration: 50}); + point.update({}, false, { duration: 50 }); var x = point.x; var y = point.y; } @@ -2306,7 +2306,7 @@ function test_SeriesObject() { series.addPoint({}, false); series.addPoint({}, false, true); series.addPoint({}, false, true, false); - series.addPoint({}, false, true, {duration: 50}); + series.addPoint({}, false, true, { duration: 50 }); var chart = series.chart; var data = series.data; series.hide(); @@ -2317,7 +2317,7 @@ function test_SeriesObject() { series.removePoint(0); series.removePoint(0, false); series.removePoint(0, false, false); - series.removePoint(0, false, {duration: 50}); + series.removePoint(0, false, { duration: 50 }); series.select(); series.select(true); var isSelected = series.selected; @@ -2326,7 +2326,7 @@ function test_SeriesObject() { series.setData([{}, {}, {}]); series.setData([0, 1, 2], false); series.setData([0, 1, 2], false, false); - series.setData([0, 1, 2], false, {duration: 50}); + series.setData([0, 1, 2], false, { duration: 50 }); series.setData([0, 1, 2], false, false, false); series.setVisible(); series.setVisible(true); From 69f9335881c9d00469f70774e66cf137010f5fa2 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Wed, 22 Mar 2017 17:01:36 -0700 Subject: [PATCH 3/4] more whitespace --- highcharts/test/index.ts | 176 +++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/highcharts/test/index.ts b/highcharts/test/index.ts index 6e1cc2d658..31feb270f6 100644 --- a/highcharts/test/index.ts +++ b/highcharts/test/index.ts @@ -1,5 +1,5 @@ -/// -import * as Highcharts from "highcharts"; // May also use /// +/// +import * as Highcharts from "highcharts"; // May also use /// function originalTests() { Highcharts.setOptions({ @@ -42,7 +42,7 @@ function originalTests() { renderTo: "container" }, xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -54,7 +54,7 @@ function originalTests() { data: [1, 2, 3, 4, 5] }); - console.log((chart1.series[0].options).dashStyle); + console.log(( chart1.series[0].options).dashStyle); var chart2 = new Highcharts.Chart({ chart: { @@ -85,7 +85,7 @@ function originalTests() { legend: { enabled: false }, - series: [{ + series: [ { data: [ [550, 870], [738, 362], [719, 711], [547, 665], [595, 197], [332, 144], [581, 555], [196, 862], [6, 837], [400, 924], [888, 148], [785, 730], @@ -120,7 +120,7 @@ function originalTests() { }, xAxis: [{ }], - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }; @@ -138,7 +138,7 @@ function originalTests() { var renderToIdChart = new Highcharts.Chart("container", { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -147,7 +147,7 @@ function originalTests() { var renderToElementChart = new Highcharts.Chart(div, { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -156,7 +156,7 @@ function originalTests() { var createWithFunction = Highcharts.chart({ xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -165,7 +165,7 @@ function originalTests() { var createWithFunctionRenderToId = Highcharts.chart("container", { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -174,7 +174,7 @@ function originalTests() { var createWithFunctionRenderToElement = Highcharts.chart(div, { xAxis: {}, - series: [{ + series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], type: "line", allowPointSelect: true @@ -219,7 +219,7 @@ function test_ChartOptions() { duration: 500, easing: "linear" }, - backgroundColor: { + backgroundColor: { linearGradient: { x1: 0, y1: 0, @@ -233,7 +233,7 @@ function test_ChartOptions() { borderWidth: 5, className: "class", defaultSeriesType: "deprecated", - events: { + events: { addSeries: () => { }, afterPrint: () => { }, beforePrint: () => { }, @@ -252,21 +252,21 @@ function test_ChartOptions() { marginLeft: 10, marginRight: 10, marginTop: 10, - options3d: { + options3d: { alpha: 20, beta: 20, depth: 50, enabled: true, frame: { - back: { + back: { color: "black", size: 2 }, - bottom: { + bottom: { color: "black", size: 2 }, - side: { + side: { color: "black", size: 2 } @@ -280,7 +280,7 @@ function test_ChartOptions() { plotBackgroundImage: "http://image.url/image.jpg", plotBorderColor: "grey", plotBorderWidth: 5, - plotShadow: { + plotShadow: { color: "magenta", offsetX: 10, offsetY: 10, @@ -290,15 +290,15 @@ function test_ChartOptions() { polar: true, reflow: false, renderTo: "elementId", - resetZoomButton: { - position: { + resetZoomButton: { + position: { align: "left", verticalAlign: "top", x: 5, y: 5 }, relativeTo: "chart", - theme: { + theme: { display: "hidden", fill: "black", stroke: "white", @@ -351,7 +351,7 @@ function test_ChartOptions() { }, tooltip: { formatter: function () { - return '' + this.series.name + '
' + this.x + ': ' + this.y; + return ' ' + this.series.name + '
' + this.x + ': ' + this.y; } }, plotOptions: {}, @@ -364,7 +364,7 @@ function test_ChartOptions() { }); // animation example - $('#container').highcharts({ + $('#container').highcharts( { chart: { animation: { duration: 1500, @@ -411,7 +411,7 @@ function test_ChartOptions() { }, tooltip: { formatter: function () { - return `${this.series.name}
${this.x}: ${this.y}`; + return ` ${this.series.name}
${this.x}: ${this.y}`; } }, series: [{ @@ -631,10 +631,10 @@ function test_Data() { } }, series: [ - { + { lineWidth: 1 }, - { + { type: 'areaspline', color: '#c4392d', negativeColor: '#5679c4', @@ -645,7 +645,7 @@ function test_Data() { // limited data example $('#container').highcharts({ - data: { + data: { csv: document.getElementById('csv').innerHTML, startRow: 114, endRow: 134, @@ -655,7 +655,7 @@ function test_Data() { xAxis: { allowDecimals: false }, - series: [{ + series: [ { name: 'Annual mean' }] }); @@ -686,14 +686,14 @@ function test_Drilldown() { type: 'category' }, plotOptions: { - series: { + series: { borderWidth: 0, dataLabels: { enabled: true } } }, - series: [{ + series: [ { name: '2010', data: [{ name: 'Republican', @@ -708,7 +708,7 @@ function test_Drilldown() { y: 4, drilldown: 'other-2010' }] - }, { + }, { name: '2014', data: [{ name: 'Republican', @@ -725,7 +725,7 @@ function test_Drilldown() { }] }], drilldown: { - series: [{ + series: [ { id: 'republican-2010', data: [ ['East', 4], @@ -733,7 +733,7 @@ function test_Drilldown() { ['North', 1], ['South', 4] ] - }, { + }, { id: 'democrats-2010', data: [ ['East', 6], @@ -741,7 +741,7 @@ function test_Drilldown() { ['North', 2], ['South', 4] ] - }, { + }, { id: 'other-2010', data: [ ['East', 2], @@ -749,7 +749,7 @@ function test_Drilldown() { ['North', 3], ['South', 2] ] - }, { + }, { id: 'republican-2014', data: [ ['East', 2], @@ -757,7 +757,7 @@ function test_Drilldown() { ['North', 1], ['South', 7] ] - }, { + }, { id: 'democrats-2014', data: [ ['East', 4], @@ -765,7 +765,7 @@ function test_Drilldown() { ['North', 5], ['South', 3] ] - }, { + }, { id: 'other-2014', data: [ ['East', 7], @@ -783,14 +783,14 @@ function test_Drilldown() { type: 'column' }, plotOptions: { - series: { + series: { borderWidth: 0, dataLabels: { enabled: true } } }, - series: [{ + series: [ { name: 'Things', colorByPoint: true, data: [{ @@ -866,7 +866,7 @@ function test_Exporting() { text: 'Highcharts sourceWidth and sourceHeight demo' }, subtitle: { - text: 'The on-screen chart is 600x400.
The exported chart is 800x400
(sourceWidth and sourceHeight multiplied by scale)', + text: 'The on-screen chart is 600x400.
The exported chart is 800x400
(sourceWidth and sourceHeight multiplied by scale)', floating: true, align: 'left', x: 60, @@ -1011,7 +1011,7 @@ function test_AreaOptions() { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, plotOptions: { - series: { + series: { fillColor: { linearGradient: [0, 0, 0, 300], stops: [ @@ -1044,7 +1044,7 @@ function test_AreaRange() { type: "arearange", zoomType: 'x' }, - series: [{ + series: [ { data: (((arr: number[], len: number) => { var i: number; for (i = 0; i < len; i = i + 1) { @@ -1090,7 +1090,7 @@ function test_AreaRange() { legend: { enabled: false }, - series: [{ + series: [ { name: 'Temperatures', data: data, dataLabels: { @@ -1115,7 +1115,7 @@ function test_Bar() { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, plotOptions: { - series: { + series: { borderColor: '#303030', borderRadius: 5, borderWidth: 2, @@ -1209,19 +1209,19 @@ function test_Bar() { shadow: false } }, - series: [{ + series: [ { name: 'Tokyo', data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], pointPadding: 0 - }, { + }, { name: 'New York', data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0, 104.3, 91.2, 83.5, 106.6, 92.3], pointPadding: 0.1 - }, { + }, { name: 'London', data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2], pointPadding: 0.2 - }, { + }, { name: 'Berlin', data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1], pointPadding: 0.3 @@ -1307,7 +1307,7 @@ function test_Bubble() { maxSize: 50 } }, - series: [{ + series: [ { data: [ [9, 81, 13], [98, 5, 39], @@ -1344,7 +1344,7 @@ function test_Bubble() { subtitle: { text: 'Size is computed by absolute value on negative bubbles' }, - series: [{ + series: [ { data: [ [-5, 0, -5], [-4, 0, -4], @@ -1401,7 +1401,7 @@ function test_ErrorBar() { tooltip: { shared: true }, - series: [{ + series: [ { name: 'Temperature', type: 'spline', data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6], @@ -1409,9 +1409,9 @@ function test_ErrorBar() { enabled: false }, tooltip: { - pointFormat: '{series.name}: {point.y:.1f}°C
' + pointFormat: ' {series.name} : {point.y:.1f}°C
' } - }, { + }, { color: '#FF0000', name: 'Temperature error', type: 'errorbar', @@ -1441,10 +1441,10 @@ function test_Funnel() { x: -50 }, plotOptions: { - series: { + series: { dataLabels: { enabled: true, - format: '{point.name} ({point.y:,.0f})', + format: ' {point.name} ({point.y:,.0f})', color: 'black', softConnector: true }, @@ -1518,7 +1518,7 @@ function test_Gauge() { } } }, - series: [{ + series: [ { data: [80], overshoot: 5 }] @@ -1574,12 +1574,12 @@ function test_HeatMap() { ], min: -5 }, - series: [{ + series: [ { borderWidth: 0, colsize: 24 * 36e5, // one day tooltip: { - headerFormat: 'Temperature
', - pointFormat: '{point.x:%e %b, %Y} {point.y}:00: {point.value} ℃' + headerFormat: 'Temperature
', + pointFormat: '{point.x:%e %b, %Y} {point.y}:00: {point.value} ℃ ' } }] }); @@ -1596,17 +1596,17 @@ function test_Line() { xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, - series: [{ + series: [ { data: [1, 2, 3, 4, null, 6, 7, null, 9], step: 'right', name: 'Right', linecap: 'round' - }, { + }, { data: [5, 6, 7, 8, null, 10, 11, null, 13], step: 'center', name: 'Center', linecap: 'round' - }, { + }, { data: [9, 10, 11, 12, null, 14, 15, null, 17], step: 'left', name: 'Left', @@ -1630,7 +1630,7 @@ function test_Pie() { text: 'Browser market shares January, 2015 to May, 2015' }, tooltip: { - pointFormat: '{series.name}: {point.percentage:.1f}%' + pointFormat: '{series.name}: {point.percentage:.1f}% ' }, plotOptions: { pie: { @@ -1639,14 +1639,14 @@ function test_Pie() { cursor: 'pointer', dataLabels: { enabled: true, - format: '{point.name}: {point.percentage:.1f} %', + format: ' {point.name} : {point.percentage:.1f} %', style: { color: 'black' } } } }, - series: [{ + series: [ { name: "Brands", colorByPoint: true, data: [{ @@ -1681,13 +1681,13 @@ function test_Pie() { plotShadow: false }, title: { - text: 'Browser
shares
2015', + text: 'Browser
shares
2015', align: 'center', verticalAlign: 'middle', y: 40 }, tooltip: { - pointFormat: '{series.name}: {point.percentage:.1f}%' + pointFormat: '{series.name}: {point.percentage:.1f}% ' }, plotOptions: { pie: { @@ -1705,7 +1705,7 @@ function test_Pie() { center: ['50%', '75%'] } }, - series: [{ + series: [ { type: 'pie', name: 'Browser share', innerSize: '50%', @@ -1802,7 +1802,7 @@ function test_Pyramid() { pyramid: { dataLabels: { enabled: true, - format: '{point.name} ({point.y:,.0f})', + format: ' {point.name} ({point.y:,.0f})', color: 'black', softConnector: true } @@ -2149,10 +2149,10 @@ function test_AxisObject() { }); axis.removePlotLine('plot-line-1'); var extremes = axis.getExtremes(); - console.log('dataMax: ' + extremes.dataMax + '
' + - 'dataMin: ' + extremes.dataMin + '
' + - 'max: ' + extremes.max + '
' + - 'min: ' + extremes.min + '
'); + console.log('dataMax: ' + extremes.dataMax + '
' + + 'dataMin: ' + extremes.dataMin + '
' + + 'max: ' + extremes.max + '
' + + 'min: ' + extremes.min + '
'); axis.remove(); axis.remove(false); axis.setCategories(['A', 'B', 'C']); @@ -2168,31 +2168,31 @@ function test_AxisObject() { axis.toPixels(10, true); axis.toValue(10); axis.toValue(10, true); - axis.update({}); - axis.update({}, true); + axis.update( {}); + axis.update( {}, true); } function test_ChartObject() { var chart = $("#container").highcharts(); - chart.addAxis({}); - chart.addAxis({}, true); - chart.addAxis({}, true, false); - chart.addAxis({}, true, true, false); - chart.addAxis({}, true, true, { duration: 50 }); - chart.addSeries({}); - chart.addSeries({}, false); - chart.addSeries({}, false, false); - chart.addSeries({}, false, { duration: 50 }); - chart.addSeriesAsDrilldown({}, {}); + chart.addAxis( {}); + chart.addAxis( {}, true); + chart.addAxis( {}, true, false); + chart.addAxis( {}, true, true, false); + chart.addAxis( {}, true, true, { duration: 50 }); + chart.addSeries( {}); + chart.addSeries( {}, false); + chart.addSeries( {}, false, false); + chart.addSeries( {}, false, { duration: 50 }); + chart.addSeriesAsDrilldown( {}, {}); var container = chart.container; console.log(container.id); chart.destroy(); chart.drillUp(); - chart.exportChart({}, {}); - chart.exportChartLocal({}, {}); + chart.exportChart( {}, {}); + chart.exportChartLocal( {}, {}); var object = chart.get('axisIdOrSeriesIdOrPointId'); var svg1 = chart.getSVG(); - var svg2 = chart.getSVG({}); + var svg2 = chart.getSVG( {}); var selectedPoints = chart.getSelectedPoints(); var selectedSeries = chart.getSelectedSeries(); chart.hideLoading(); From b1ef7496905b475e1c6d72cdea8bbc9164c4c176 Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Wed, 22 Mar 2017 17:09:07 -0700 Subject: [PATCH 4/4] Final whitespace --- highcharts/test/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/highcharts/test/index.ts b/highcharts/test/index.ts index 31feb270f6..88fa3e8114 100644 --- a/highcharts/test/index.ts +++ b/highcharts/test/index.ts @@ -449,7 +449,7 @@ function test_ChartOptions() { chart: { events: { addSeries: function () { - var label = (this).renderer.label('A series was added, about to redraw chart', 100, 120) + var label = ( this).renderer.label('A series was added, about to redraw chart', 100, 120) .attr({ fill: Highcharts.getOptions().colors[0], padding: 10, @@ -1016,7 +1016,7 @@ function test_AreaOptions() { linearGradient: [0, 0, 0, 300], stops: [ [0, Highcharts.getOptions().colors[0]], - [1, (Highcharts.Color(Highcharts.getOptions().colors[0])).setOpacity(0).get('rgba')] + [1, ( Highcharts.Color(Highcharts.getOptions().colors[0])).setOpacity(0).get('rgba')] ] }, fillOpacity: 0.1, @@ -1174,7 +1174,7 @@ function test_Bar() { // grouping example Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, (color: string) => { - return (Highcharts.Color(color)) + return ( Highcharts.Color(color)) .setOpacity(0.5) .get('rgba'); }); @@ -2258,7 +2258,7 @@ function test_ElementObject() { } function test_PointObject() { - var point = $('#container').highcharts().get('point1'); + var point = $('#container').highcharts().get('point1'); var category = point.category; var percentage = point.percentage; point.index; @@ -2299,7 +2299,7 @@ function test_RendererObject() { } function test_SeriesObject() { - var series = $('#container').highcharts().get('series1'); + var series = $('#container').highcharts().get('series1'); series.addPoint(0); series.addPoint([0, 0]); series.addPoint({});