UNPKG

@ryancavanaugh/amcharts

Version:

Type definitions for amCharts from https://www.github.com/DefinitelyTyped/DefinitelyTyped

938 lines (887 loc) 146 kB
// Type definitions for amCharts // Project: http://www.amcharts.com/ // Definitions by: aleksey-bykov <https://github.com/aleksey-bykov> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// AmCharts object (it's not a class) is create automatically when amcharts.js or amstock.js file is included in a web page. declare namespace AmCharts { /** Set it to true if you have base href set for your page. This will fix rendering problems in Firefox caused by base href. */ var baseHref: boolean; /** Array of day names, used when formatting dates (if categoryAxis.parseDates is set to true) ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] */ var dayNames: string[]; /** Array of month names, used when formatting dates (if categoryAxis.parseDates is set to true) ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] */ var monthNames: string[]; /** Array of short versions of day names, used when formatting dates (if categoryAxis.parseDates is set to true) ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] */ var shortDayNames: string[]; /** Array of short versions of month names, used when formatting dates (if categoryAxis.parseDates is set to true) ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] */ var shortMonthNames: string[]; /** Set it to true if you want UTC time to be used instead of local time. */ var useUTC: boolean; /** Clears all the charts on page, removes listeners and intervals. */ function clear(); /** AmPieChart class creates pie/donut chart. In order to display pie chart you need to set at least three properties - dataProvider, titleField and valueField. @example var chartData = [{title:"Pie I have eaten",value:70},{title:"Pie I haven\'t eaten",value:30}]; var chart = new AmCharts.AmPieChart(); chart.valueField = "value"; chart.titleField = "title"; chart.dataProvider = chartData; chart.write("chartdiv"); */ class AmPieChart { /** Name of the field in chart's dataProvider which holds slice's alpha. */ alphaField: string; /** Pie lean angle (for 3D effect). Valid range is 0 - 90. */ angle: number; /** Balloon text. The following tags can be used: [[value]], [[title]], [[percents]], [[description]]. [[title]]: [[percents]]% ([[value]])\n[[description]] */ balloonText: string; /** Read-only. Array of Slice objects. */ chartData: any[]; /** Name of the field in chart's dataProvider which holds slice's color. */ colorField: string; /** Specifies the colors of the slices, if the slice color is not set. If there are more slices than colors in this array, the chart picks random color. ["#FF0F00", "#FF6600", "#FF9E01", "#FCD202", "#F8FF01", "#B0DE09", "#04D215", "#0D8ECF", "#0D52D1", "#2A0CD0", "#8A0CCF", "#CD0D74", "#754DEB", "#DDDDDD", "#999999", "#333333", "#000000", "#57032A", "#CA9726", "#990000", "#4B0C25"] */ colors: any[]; /** Depth of the pie (for 3D effect). */ depth3D: number; /** Name of the field in chart's dataProvider which holds a string with description. */ descriptionField: string; /** Example: [-0.2,0.2]. Will make slices to be filled with color gradients. */ gradientRatio: number[]; /** Opacity of the group slice. Value range is 0 - 1. @default 1 */ groupedAlpha: number; /** Color of the group slice. The default value is not set - this means the next available color from "colors" array will be used. */ groupedColor: string; /** Description of the group slice. */ groupedDescription: string; /** If this is set to true, the group slice will be pulled out when the chart loads. */ groupedPulled: boolean; /** Title of the group slice. Other */ groupedTitle: string; /** If there is more than one slice whose percentage of the pie is less than this number, those slices will be grouped together into one slice. This is the "other" slice. It will always be the last slice in a pie. */ groupPercent: number; /** Slices with percent less then hideLabelsPercent won't display labels This is useful to avoid cluttering up the chart, if you have a lot of small slices. 0 means all labels will be shown. */ hideLabelsPercent: number; /** Opacity of a hovered slice. Value range is 0 - 1. @default 1 */ hoverAlpha: number; /** Inner radius of the pie, in pixels or percents. */ innerRadius: any; /** The distance between the label and the slice, in pixels. You can use negative values to put the label on the slice. @default 30 */ labelRadius: number; /** Name of the field in dataProvider which specifies the length of a tick. Note, the chart will not try to arrange labels automatically if this property is set. */ labelRadiusField: string; /** Specifies whether data labels are visible. @default true */ labelsEnabled: boolean; /** Label text. The following tags can be used: [[value]], [[title]], [[percents]], [[description]]. [[title]]: [[percents]]% */ labelText: string; /** Label tick opacity. Value range is 0 - 1. 0.2 */ labelTickAlpha: number; /** Label tick color. #000000 */ labelTickColor: string; /** Bottom margin of the chart. @default 5 */ marginBottom: number; /** Left margin of the chart. */ marginLeft: number; /** Right margin of the chart. */ marginRight: number; /** Top margin of the chart. @default 5 */ marginTop: number; /** Minimum radius of the pie, in pixels. @default 10 */ minRadius: number; /** Pie outline opacity. Value range is 0 - 1. */ outlineAlpha: number; /** Pie outline color. #FFFFFF */ outlineColor: string; /** Pie outline thickness. @default 1 */ outlineThickness: number; /** Opacity of the slices. You can set the opacity of individual slice too. @default 1 */ pieAlpha: number; /** Color of the first slice. All the other will be colored with darker or brighter colors. */ pieBaseColor: string; /** Lightness increase of each subsequent slice. This is only useful if pieBaseColor is set. Use negative values for darker colors. Value range is from -255 to 255. @default 30*/ pieBrightnessStep: number; /** You can set fixed position of a pie center, in pixels or in percents. */ pieX: any; /** You can set fixed position of a pie center, in pixels or in percents. */ pieY: any; /** Name of the field in chart's dataProvider which holds a boolean value telling the chart whether this slice must be pulled or not. */ pulledField: string; /** Pull out duration, in seconds. @default 1 */ pullOutDuration: number; /** Pull out effect. Possible values are ">", "<", elastic" and "bounce". bounce */ pullOutEffect: string; /** If this is set to true, only one slice can be pulled out at a time. If the viewer clicks on a slice, any other pulled-out slice will be pulled in. */ pullOutOnlyOne: boolean; /** Pull out radius, in pixels or percents 0.2 */ pullOutRadius: any; /** Radius of a pie, in pixels or percents. By default, radius is calculated automatically. */ radius: any; /** Specifies whether the animation should be sequenced or all slices should appear at once. */ sequencedAnimation: boolean; /** Initial opacity of all slices. If you set startDuration higher than 0, slices will fade in from startAlpha. @default 1 */ startAlpha: number; /** Angle of the first slice, in degrees. This will work properly only if "depth3D" is set to 0. If "depth3D" is greater than 0, then there can be two angles only: 90 and 270. Value range is 0-360. @default 90 */ startAngle: number; /** Duration of the animation, in seconds. @default 1 */ startDuration: number; /** Animation effect. Possible values are ">", "<", "elastic" and "bounce". bounce */ startEffect: string; /** Radius of the positions from which the slices will fly in. default 5 */ startRadius: any; /** Name of the field in chart's dataProvider which holds slice's title. */ titleField: string; /** Name of the field in chart's dataProvider which holds url which would be accessed if the user clicks on a slice. */ urlField: string; /** If url is specified for a slice, it will be opened when user clicks on it. urlTarget specifies target of this url. Use _blank if you want url to be opened in a new window. _self */ urlTarget: string; /** Name of the field in chart's dataProvider which holds slice's value. */ valueField: string; /** Name of the field in chart's dataProvider which holds boolean variable defining whether this data item should have an entry in the legend. */ visibleInLegendField: string; /** You can trigger the animation of the pie chart. */ animateAgain(); /** You can trigger the click on a slice from outside. index - the number of a slice or Slice object. */ clickSlice(index: number); /** Hides slice. index - the number of a slice or Slice object. */ hideSlice(index: number); /** You can simulate roll-out of a slice from outside. index - the number of a slice or Slice object. */ rollOutSlice(index: number); /** You can simulate roll-over a slice from outside. index - the number of a slice or Slice object. */ rollOverSlice(index: number); /** Shows slice. index - the number of a slice or Slice object. */ showSlice(index: number); /** Adds event listener of the type "clickSlice" or "pullInSlice" or "pullOutSlice" to the object. @param type Always "clickSlice" or "pullInSlice" or "pullOutSlice". @param handler If the type is "clickSlice", dispatched when user clicks on a slice. If the type is "pullInSlice", dispatched when user clicks on a slice and the slice is pulled-in. If the type is "pullOutSlice", dispatched when user clicks on a slice and the slice is pulled-out. If the type is "rollOutSlice", dispatched when user rolls-out of the slice. If the type is "rollOverSlice", dispatched when user rolls-over the slice. */ addListener(type: string, handler: (e: {/** Always "rollOverSlice". */ type: string; dataItem: Slice; }) => void ); } /** AmRadarChart is the class you have to use for radar and polar chart types. @example var chart; var chartData = [ {country:"Czech Republic",litres:156.90}, {country:"Ireland",litres:131.10}, {country:"Germany",litres:115.80}, {country:"Australia",litres:109.90}, {country:"Austria",litres:108.30}, {country:"UK",litres:99.00} ]; window.onload = function() { chart = new AmCharts.AmRadarChart(); chart.dataProvider = chartData; chart.categoryField = "country"; chart.startDuration = 2; var valueAxis = new AmCharts.ValueAxis(); valueAxis.axisAlpha = 0.15; valueAxis.minimum = 0; valueAxis.dashLength = 3; valueAxis.axisTitleOffset = 20; valueAxis.gridCount = 5; chart.addValueAxis(valueAxis); var graph = new AmCharts.AmGraph(); graph.valueField = "litres"; graph.bullet = "round"; graph.balloonText = "[[value]] litres of beer per year" chart.addGraph(graph); chart.write("chartdiv"); } */ class AmRadarChart extends AmCoordinateChart { /** Bottom margin of the chart. */ marginBottom: number; /** Left margin of the chart. */ marginLeft: number; /** Right margin of the chart. */ marginRight: number; /** Top margin of the chart. */ marginTop: number; /** Radius of a radar. 0.35 */ radius: any; } /** AmXYChart is the class you have to use for XY/Bubble/Scatter chart types. The chart supports simple and logarithmic scales, it can have multiple value axes. @example var chartData = [ {x:10, y:14, value:59}, {x:5, y:3, value:50}, {x:-10, y:-3, value:19}, {x:-6, y:5, value:65}, {x:15, y:-4, value:92}, {x:13, y:1, value:8}, {x:1, y:6, value:35} ]; var chart = new AmCharts.AmXYChart(); chart.pathToImages = "../../amcharts/javascript/images/"; chart.dataProvider = chartData; chart.marginLeft = 35; chart.startDuration = 1.5; var xAxis = new AmCharts.ValueAxis(); xAxis.position = "left"; xAxis.autoGridCount = true; chart.addValueAxis(xAxis); var yAxis = new AmCharts.ValueAxis(); yAxis.position = "bottom"; yAxis.autoGridCount = true; chart.addValueAxis(yAxis); var graph = new AmCharts.AmGraph(); graph.valueField = "value"; graph.xField = "x"; graph.yField = "y"; graph.lineAlpha = 0; graph.bullet = "round"; chart.addGraph(graph); var chartCursor = new AmCharts.ChartCursor(); chart.addChartCursor(chartCursor); var chartScrollbar = new AmCharts.ChartScrollbar(); chartScrollbar.hideResizeGrips = false; chart.addChartScrollbar(chartScrollbar); chart.write("chartdiv); */ class AmXYChart extends AmRectangularChart { /** Specifies if Scrollbar of X axis (horizontal) should be hidden. */ hideXScrollbar: boolean; /** Specifies if Scrollbar of Y axis (vertical) should be hidden. */ hideYScrollbar: boolean; /** Maximum zoom factor of the chart. @default 20 */ maxZoomFactor: number; /** Zooms out, charts shows all available data.*/ zoomOut(); } /** Guides are straight vertical or horizontal lines or areas supported by AmSerialChart, AmXYChart and AmRadarChart. You can have guides both on value and category axes. To add/remove a guide to an axis, use axis.addGuide(guide)/axis.removeGuide(guide) methods. If you do not set properties such as dashLength, lineAlpha, lineColor, etc - values of the axis are used.*/ class Guide { /** If you set it to true, the guide will be displayed above the graphs. */ above: boolean; /** Radar chart only. Specifies angle at which guide should start. Affects only fills, not lines. */ angle: number; /** Baloon fill color. */ balloonColor: string; /** The text which will be displayed if the user rolls-over the guide. */ balloonText: string; /** Specifies if label should be bold or not. */ boldLabel: boolean; /** Category of the guide (in case the guide is for category axis). */ category: string; /** Dash length. */ dashLength: number; /** Date of the guide (in case the guide is for category axis and parseDates is set to true). */ date: Date; /** Works if a guide is added to CategoryAxis and this axis is non-date-based. If you set it to true, the guide will start (or be placed, if it's not a fill) on the beginning of the category cell and will end at the end of toCategory cell. */ expand: boolean; /** Fill opacity. Value range is 0 - 1. */ fillAlpha: number; /** Fill color. */ fillColor: string; /** Font size of guide label. */ fontSize: string; /** Unique id of a Guide. You don't need to set it, unless you want to. */ id: string; /** Specifies whether label should be placed inside or outside plot area. */ inside: boolean; /** The label which will be displayed near the guide. */ label: string; /** Rotation angle of a guide label. */ labelRotation: number; /** Line opacity. */ lineAlpha: number; /** Line color. */ lineColor: string; /** Line thickness. */ lineThickness: number; /** Position of guide label. Possible values are "left" or "right" for horizontal axis and "top" or "bottom" for vertical axis. */ position: string; /** Tick length. */ tickLength: number; /** Radar chart only. Specifies angle at which guide should end. Affects only fills, not lines. */ toAngle: number; /** To category of the guide (in case the guide is for category axis). */ toCategory: string; /** To date of the guide (in case the guide is for category axis and parseDates is set to true) If you have both date and toDate, the space between these two dates can be filled with color. */ toDate: Date; /** To value of the guide (in case the guide is for value axis). */ toValue: number; /** Value of the guide (in case the guide is for value axis). */ value: number; /** Value axis of a guide. As you can add guides directly to the chart, you might need to specify which which value axis should be used. */ valueAxis: ValueAxis; } /** ImagesSettings is a class which holds common settings of all MapImage objects. */ class ImagesSettings { /** Opacity of the image. @default 1 */ alpha: number; /** Text which is displayed in a roll-over balloon. You can use the following tags: [[title]], [[description]], [[value]] and [[percent]]. [[title]] */ balloonText: string; /** Specifies if the image's center should be placed in the provided coordinates. If false, top-left corner will be at provided coordinates. @default true */ centered: boolean; /** Color of image. This will affect only predefined images (with "type" property set) and images with svgPath set. This property won't affect bitmap images and loaded SVG images. #000000 */ color: string; /** Height of a description window. */ descriptionWindowHeight: number; /** Width of a description window. @default 250 */ descriptionWindowWidth: number; /** X position of a description window. */ descriptionWindowX: number; /** Y position of a description window. */ descriptionWindowY: number; /** Label color. #000000 */ labelColor: string; /** Font size of a label. @default 11 */ labelfontSize: string; /** Position of the label. Allowed values are: left, right, top, bottom and middle. right */ labelPosition: string; /** Label roll-over color. #00CC00 */ labelRollOverColor: string; /** Opacity of image outline. This will affect only predefined images (with "type" property set) and images with svgPath set. This property won't affect bitmap images and loaded SVG images. */ outlineAlpha: number; /** Color of image outline. This will affect only predefined images (with "type" property set) and images with svgPath set. This property won't affect bitmap images and loaded SVG images. */ outlineColor: string; /** Thickness of image outline. This will affect only predefined images (with "type" property set) and images with svgPath set. This property won't affect bitmap images and loaded SVG images. @default 1 */ outlineThickness: number; /** Color of image when hovered. This will affect only predefined images (with "type" property set) and images with svgPath set. This property won't affect bitmap images and loaded SVG images. */ rollOverColor: string; /** Scale of the image when hovered. Use value like 1.5 - 2 to enlarge image when user rolls-over it. @default 1 */ rollOverScale: number; /** Scale of the image if it is selected. Use value like 1.5 - 2 to enlarge selected image. @default 1 */ selectedScale: number; } /** AreasSettings is a class which holds common settings of all MapArea objects. */ class AreasSettings { /** Opacity of areas. @default 1 */ alpha: number; /** Specifies if the areas should be zoomed-in when user clicks on them, event if zoom properties are not set. */ autoZoom: boolean; /** Text which is displayed in a roll-over balloon. You can use the following tags: [[title]], [[description]], [[value]] and [[percent]] [[title]] */ balloonText: string; /** Color of the areas. #FFCC00 */ color: string; /** Color of area with highest value. Colors for areas with values less then highest will be colored with intermediate colors between color and colorSolid. Use colorSteps property of AmMap to change the number of intermediate colors. #990000 */ colorSolid: string; /** Height of a description window. */ descriptionWindowHeight: number; /** Width of a description window. @default 250 */ descriptionWindowWidth: number; /** X position of a description window. */ descriptionWindowX: number; /** Y position of a description window. */ descriptionWindowY: number; /** Opacity of area's outline. @default 1 */ outlineAlpha: number; /** Color of area's outline. #FFFFFF */ outlineColor: string; /** Thickness of area's outline. 0.5 */ outlineThickness: number; /** Color of area when user rolls-over it. undefined */ rollOverColor: string; /** Color of area's outline when user rolls-over it. #CC0000 */ rollOverOutlineColor: string; /** Color of area which is currently selected. #CC0000 */ selectedColor: string; /** Opacity of all areas which are in the map svg file, but not listed as areas in DataSet. @default 1 */ unlistedAreasAlpha: number; /** Color of all areas which are in the map svg file, but not listed as areas in DataSet. #DDDDDD */ unlistedAreasColor: string; /** Opacity of all areas' outline which are in the map svg file, but not listed as areas in DataSet. @default 1 */ unlistedAreasOutlineAlpha: number; /** Color of all areas' outline which are in the map svg file, but not listed as areas in DataSet. #FFFFFF */ unlistedAreasOutlineColor: string; } /** Slice is an item of AmPieChart's chartData Array and holds all the information about the slice. When working with a pie chart, you do not create slices or change it's properties directly, instead you set array of data using dataProvider property. Consider properties of a Slice read-only - change values in chart's data provider if you need to. */ class Slice { /** Opacity of a slice. */ alpha: number; /** Color of a slice. */ color: string; /** Original object from data provider. */ dataContext: Object; /** Slice description. */ description: string; /** Specifies whether the slice is hidden */ hidden: boolean; /** Percent value of a slice. */ percents: number; /** Specifies whether the slice is pulled or not. */ pulled: boolean; /** Slice title */ title: string; /** Url of a slice */ url: string; /** Value of a slice */ value: number; /** specifies whether this slice has a legend entry */ visibleInLegend: boolean; } /** AmStockChart is a main class Stock chart. */ class AmStockChart { /** Specifies if animation was already played. Animation is only played once, when chart is rendered for the first time. If you want the animation to be repeated, set this property to false. */ animationPlayed: boolean; /** Balloon object. */ balloon: AmBalloon; /** Settings for category axes. */ categoryAxesSettings: CategoryAxesSettings; /** Indicates if the chart is created. */ chartCreated: boolean; /** Chart cursor settings. */ chartCursorSettings: ChartCursorSettings; /** Chart scrollbar settings. */ chartScrollbarSettings: ChartScrollbarSettings; /** Array of colors used by data sets if no color was set explicitly on data set itself. #FF6600, "#FCD202", "#B0DE09", "#0D8ECF", "#2A0CD0", "#CD0D74", "#CC0000", "#00CC00", "#0000CC", "#DDDDDD", "#999999", "#333333", "#990000" */ colors: any[]; /** Array of data sets selected for comparing. */ comparedDataSets: any[]; /** Array of DataSets. */ dataSets: any[]; /** DataSetSelector object. You can add it if you have more than one data set and want users to be able to select/compare them. */ dataSetSelector: DataSetSelector; /** Current end date of the selected period, get only. To set start/end dates, use stockChart.zoom(startDate, endDate) method. */ endDate: Date; /** Defines on which day week starts. 0 - Sunday, 1 - Monday.. @default 1 */ firstDayOfWeek: number; /** If set to true the scope of the data view will be set to the end after data update. */ glueToTheEnd: boolean; /** Legend settings. */ legendSettings: LegendSettings; /** Data set selected as main. */ mainDataSet: DataSet; /** Array of StockPanels (charts). */ panels: any[]; /** Settings for stock panels. */ panelsSettings: PanelsSettings; /** Period selector object. You can add it if you want user's to be able to enter date ranges or zoom chart with predefined period buttons. */ periodSelector: PeriodSelector; /** Scrollbar's chart object, get only. */ scrollbarChart: AmSerialChart; /** Current start date of the selected period, get only. To set start/end dates, use stockChart.zoom(startDate, endDate) method. */ startDate: Date; /** Settings for stock events. */ stockEventsSettings: any; /** Settings for value axes. */ valueAxesSettings: ValueAxesSettings; /** read-only. Indicates current version of a script. */ version: string; /** Specifies whether the chart should zoom-out when main data set is changed. */ zoomOutOnDataSetChange: boolean; /** Adds panel to the stock chart. Requires stockChart.validateNow() method to be called after this action. */ addPanel(panel: StockPanel); /** Adds panel to the stock chart at a specified index. Requires stockChart.validateNow() method to be called after this action. */ addPanelAt(panel: StockPanel, index: number); /** Destroys chart, all timeouts and listeners. */ clear(); /** Hides event bullets. */ hideStockEvents(); /** Removes event listener from the object. */ removeListener(obj: any, type: string, handler: any); /** Removes panel from the stock chart. Requires stockChart.validateNow() method to be called after this action. */ removePanel(panel: StockPanel); /** Shows event bullets. */ showStockEvents(); /** Method which should be called after data was changed. */ validateData(); /** Method which forces the stock chart to rebuild. Should be called after properties are changed. */ validateNow(); /** Zooms chart to specified dates. startDate, endDate - Date objects. */ zoom(startDate: Date, endDate: Date); /** Zooms out the chart. */ zoomOut(); /** Adds event listener of the type "dataUpdated" or "init" or "rendered" to the object. @param type Always "dataUpdated" or "init" or "rendered". @param handler If the type is "dataUpdated", dispatched when the chart was updated with new data. If the type is "init", dispatched when the chart is initialized for the first time. In case you want it to fire again after validateNow() method is called, set chart.chartCreated = false. If the type is "rendered", dispatched each when chart is rendered. */ addListener(type: string, handler: (e: { /** Either "dataUpdated" or "init". */ type: string; chart: AmStockChart; }) => void ); /** Adds event listener of the type "rollOutStockEvent" or "rollOverStockEvent" or "clickStockEvent" to the object. @param type // Either "rollOutStockEvent" or "rollOverStockEvent" or "clickStockEvent". @param handler If the type is "rollOutStockEvent", dispatched when the user rolls-out of the Stock event (bullet). If the type is "rollOverStockEvent", dispatched when the user rolls-over of the Stock event (bullet). If the type is "clickStockEvent", dispatched when the user clicks on the Stock event (bullet). */ addListener(type: string, handler: (e: { /** Always "rollOverStockEvent". */ type: string; eventObject: any; graph: AmGraph; date: Date; chart: AmStockChart; }) => void ); /** Adds event listener of the type "zoomed" to the object. @param type Always "zoomed". @param handler Dispatched when the chart is zoomed (even for the first time, when chart is initialized).*/ addListener(type: string, handler: (e: { /** Always "zoomed". */ type: string; startDate: Date; endDate: Date; period: string; chart: AmStockChart; }) => void ); /** Adds event listener of the type "panelRemoved" to the object. @param type Always "panelRemoved". @param handler Dispatched when the StockPanel is removed.*/ addListener(type: string, handler: (e: { /** Always "panelRemoved". */ type: string; panel: StockPanel; chart: AmStockChart; }) => void ); /** Removes event listener from chart object. */ removeListener(chart: AmChart, type: string, handler: any); } /** ValueAxesSettings settings set 's settings for all ValueAxes. If you change a property after the chart is initialized, you should call stockChart.validateNow() method in order for it to work. If there is no default value specified, default value of ValueAxis class will be used. */ class ValueAxesSettings { /** Specifies whether number for gridCount is specified automatically, according to the axis size. @default true */ autoGridCount: boolean; /** Axis opacity. */ axisAlpha: number; /** Axis color. */ axisColor: string; /** Thickness of the axis. */ axisThickness: number; /** Label color. */ color: string; /** Length of a dash. By default, the grid line is not dashed. */ dashLength: number; /** Fill opacity. Every second space between grid lines can be filled with color. */ fillAlpha: number; /** Fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills. */ fillColor: string; /** Opacity of grid lines. */ gridAlpha: number; /** Color of grid lines. */ gridColor: string; /** Approximate number of grid lines. autoGridCount should be set to false, otherwise this property will be ignored. */ gridCount: number; /** Thickness of grid lines. */ gridThickness: number; /** Specifies whether guide values should be included when calculating min and max of the axis. */ includeGuidesInMinMax: boolean; /** If true, the axis will include hidden graphs when calculating min and max values. */ includeHidden: boolean; /** Specifies whether values should be placed inside or outside plot area. In case you set this to false, you'll have to adjust marginLeft or marginRight in [[PanelsSettings]] in order labels to be visible. @default true */ inside: boolean; /** Specifies whether values on axis can only be integers or both integers and doubles. */ integersOnly: boolean; /** Frequency at which labels should be placed. */ labelFrequency: number; /** Specifies whether value labels are displayed. */ labelsEnabled: boolean; /** Set to true if value axis is logarithmic, false otherwise. */ logarithmic: boolean; /** The distance of the axis to the plot area, in pixels. Useful if you have more then one axis on the same side. */ offset: number; /** Position of the value axis. Possible values are "left" and "right". */ position: string; /** Set to true if value axis is reversed (smaller values on top), false otherwise. */ reversed: boolean; /** Specifies if first label of value axis should be displayed. */ showFirstLabel: boolean; /** Specifies if last label of value axis should be displayed. */ showLastLabel: boolean; /** Stacking mode of the axis. Possible values are: "none", "regular", "100%", "3d". */ stackType: string; /** Tick length. */ tickLength: number; /** Unit which will be added to the value label. */ unit: string; /** Position of the unit. Possible values are "left" or "right". */ unitPosition: string; } /** AmLegend is the class that displays legend of the chart. Legend to the chart should be added using chart.addLegend(legend) method. @example var chart = new AmCharts.AmSerialChart(); var legend = new AmCharts.AmLegend(); chart.addLegend(legend); */ class AmLegend { /** Alignment of legend entries. Possible values are: "left", "center", "right". left */ align: string; /** Used if chart is Serial or XY. In case true, margins of the legend are adjusted and made equal to chart's margins. @default true */ autoMargins: boolean; /** Opacity of legend's background. Value range is 0 - 1 */ backgroundAlpha: number; /** Background color. You should set backgroundAlpha to >0 vallue in order background to be visible. #FFFFFF */ backgroundColor: string; /** Opacity of chart's border. Value range is 0 - 1. */ borderAlpha: number; /** Color of legend's border. You should set borderAlpha >0 in order border to be visible. #000000 */ borderColor: string; /** In case legend position is set to "absolute", you can set distance from bottom of the chart, in pixels. */ bottom: number; /** Text color. Will use chart's color if not set. */ color: string; /** This can be used by AmMap only. You can pass array of objects with title, color, markerType values, for example: [{title: "One", color: "#3366CC"},{title: "Two", color: "#FFCC33"}] */ data: any[]; /** Specifies if each of legend entry should be equal to the most wide entry. Won't look good if legend has more than one line. @default true */ equalWidths: boolean; /** Font size. Will use chart's font size if not set. */ fontSize: string; /** Horizontal space between legend item and left/right border. */ horizontalGap: number; /** The text which will be displayed in the legend. Tag [[title]] will be replaced with the title of the graph. [[title]] */ labelText: string; /** In case legend position is set to "absolute", you can set distance from left side of the chart, in pixels. */ left: number; /** Bottom margin. */ marginBottom: number; /** Left margin. This property will be ignored if chart is Serial or XY and autoMargins property of the legend is true (default). @default 20 */ marginLeft: number; /** Right margin. This property will be ignored if chart is Serial or XY and autoMargins property of the legend is true (default). @default 20 */ marginRight: number; /** Top margin. */ marginTop: number; /** Marker border opacity 1. */ markerBorderAlpha: number; /** Marker border color. If not set, will use the same color as marker. */ markerBorderColor: string; /** Thickness of the legend border. The default value (0) means the line will be a "hairline" (1 px). In case marker type is line, this style will be used for line thickness. @default 1 */ markerBorderThickness: number; /** The color of the disabled marker (when the graph is hidden). #AAB3B3 */ markerDisabledColor: string; /** Space between legend marker and legend text, in pixels. @default 5 */ markerLabelGap: number; /** Size of the legend marker (key). @default 16 */ markerSize: number; /** Shape of the legend marker (key). Possible values are: "square", "circle", "line", "dashedLine", "triangleUp", "triangleDown", "bubble", "none". square */ markerType: string; /** Maximum number of columns in the legend. If Legend's position is set to "right" or "left", maxColumns is automatically set to 1. */ maxColumns: number; /** Position of a legend. Possible values are: "bottom", "top", "left", "right" and "absolute". In case "absolute", you should set left and top properties too. (this setting is ignored in Stock charts). In case legend is used with AmMap, position is set to "absolute" automatically. bottom */ position: string; /** Specifies whether legend entries should be placed in reversed order. */ reversedOrder: boolean; /** In case legend position is set to "absolute", you can set distance from right side of the chart, in pixels. */ right: number; /** Legend item text color on roll-over. #CC0000 */ rollOverColor: string; /** When you roll-over the legend entry, all other graphs can reduce their opacity, so that the graph you rolled-over would be distinguished. This style specifies the opacity of the graphs. @default 1 */ rollOverGraphAlpha: number; /** You can use this property to turn all the legend entries off. @default true */ showEntries: boolean; /** Horizontal space between legend items, in pixels. @default 10 */ spacing: number; /** Whether showing/hiding of graphs by clicking on the legend marker is enabled or not. In case legend is used with AmMap, this is set to false automatically. @default true */ switchable: boolean; /** Legend switch color. #FFFFFF */ switchColor: string; /** Legend switch type (in case the legend is switchable). Possible values are "x" and "v". x */ switchType: string; /** If true, clicking on the text will show/hide balloon of the graph. Otherwise it will show/hide graph/slice, if switchable is set to true. */ textClickEnabled: boolean; /** In case legend position is set to "absolute", you can set distance from top of the chart, in pixels. */ top: number; /** Legend markers can mirror graph’s settings, displaying a line and a real bullet as in the graph itself. Set this property to true if you want to enable this feature. Note, if you set graph colors in dataProvider, they will not be reflected in the marker. @default false*/ useGraphSettings: boolean; /** Specifies if legend labels should be use same color as corresponding markers. */ useMarkerColorForLabels: boolean; /** Alignment of the value text. Possible values are "left" and "right". right */ valueAlign: string; /** The text which will be displayed in the value portion of the legend. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents]], [[description]]. [[value]] */ valueText: string; /** Width of the value text. @default 80 */ valueWidth: number; /** Vertical space between legend items also between legend border and first and last legend row. 10 */ verticalGap: number; /** Adds event listener of the type "clickLabel" or "clickMarker" or "hideItem" to the object. @param type Either "clickLabel" or "clickMarker" or "hideItem". @param handler If the type is "clickLabel", dispatched when legend label is clicked. If the type is "clickMarker", dispatched when legend marker is clicked. If the type is "hideItem", dispatched when user clicks on a legend item marker and hides corresponding object. If the type is "rollOutItem", dispatched when user rolls-out of the legend item label (or whole item, if switchable is set to false). If the type if "rollOverItem", dispatched when user rolls-over the legend item label (or whole item, if switchable is set to false). If the type is "rollOutMarker", dispatched when user clicks out of a legend item marker and shows corresponding object. If the type if "rollOverMarker", dispatched when user clicks on a legend item marker and shows corresponding object. */ /** Adds event listener of the type "showItem" to the object. @param type Always "showItem". @param handler */ addListener(type: string, handler: (e: {/** Always "showItem". */ type: string; dataItem: Object; chart: AmChart; }) => void ); /** Removes event listener from chart object. */ removeListener(chart: AmChart, type: string, handler: any); } /** StockLegend is a legend of StockPanel. */ class StockLegend extends AmLegend { /** The text which will be displayed in the value portion of the legend when graph is comparable and at least one dataSet is selected for comparing. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents.value/open/close/low/high]], [[description]]. [[percents.value]]% */ valueTextComparing: string; /** The text which will be displayed in the value portion of the legend. You can use tags like [[value]], [[open]], [[high]], [[low]], [[close]], [[percents]], [[description]]. [[value]] */ valueTextRegular: string; } /** StockPanel class creates stock panels (charts). AmStockChart can have multiple Stock panels. */ class StockPanel extends AmSerialChart { /** Specifies whether x button will be displayed near the panel. This button allows turning panel off. */ allowTurningOff: boolean; /** If true, drawing icons will be displayed in top-right corner. */ drawingIconsEnabled: boolean; /** Specifies on which value axis user can draw trend lines. Set drawingIconsEnabled to true if you want drawing icons to be visible. First value axis will be used if not set here. */ drawOnAxis: ValueAxis; /** Specifies if all trend lines should be erased when erase button is clicked. If false, trend lines can be erased one by one. */ eraseAll: boolean; /** Size of trend line drawing icons. If you change this size, you should update icon images if you want them to look properly. @default 18 */ iconSize: number; /** Relative height of panel. Possible values 0 - 100. */ percentHeight: number; /** Specifies when values should be recalculated to percents. Possible values are: "never", "always", "whenComparing". whenComparing */ recalculateToPercents: string; /** Specifies whether this panel will show category axis. @default true */ showCategoryAxis: boolean; /** */ stockGraphs: StockGraph[]; /** Stock chart legend. */ stockLegend: StockLegend; /** Title of a panel. Note, StockLegend should be added in order title to be displayed. */ title: string; /** Trend line opacity. @default 1 */ trendLineAlpha: number; /** Trend line color. #00CC00 */ trendLineColor: string; /** Trend line dash length. */ trendLineDashLength: number; /** Trend line thickness. @default 2 */ trendLineThickness: number; /** Adds a graph to the panel. */ addStockGraph(graph: StockGraph); /** Removes graph from the panel. */ removeStockGraph(graph: StockGraph); } /** AmChart is a base class of all charts. It can not be instantiated explicitly. AmCoordinateChart, AmPieChart and AmMap extend AmChart class. */ class AmChart { /** used when constructing a chart with a theme */ constructor(theme?: any); /** Specifies, if class names should be added to chart elements. */ addClassNames: boolean; /** Array of Labels. Example of label object, with all possible properties: {"x": 20, "y": 20, "text": "this is label", "align": "left", "size": 12, "color": "#CC0000", "alpha": 1, "rotation": 0, "bold": true, "url": "http://www.amcharts.com"} */ allLabels: Label[]; /** Set this to false if you don't want chart to resize itself whenever its parent container size changes. */ autoResize: boolean; /** Opacity of background. Set it to >0 value if you want backgroundColor to work. However we recommend changing div's background-color style for changing background color. */ backgroundAlpha: number; /** Background color. You should set backgroundAlpha to >0 value in order background to be visible. We recommend setting background color directly on a chart's DIV instead of using this property. #FFFFFF */ backgroundColor: string; /** The chart creates AmBalloon class itself. If you want to customize balloon, get balloon instance using this property, and then change balloon's properties. AmBalloon */ balloon: AmBalloon; /** Opacity of chart's border. Value range is 0 - 1. */ borderAlpha: number; /** Color of chart's border. You should set borderAlpha >0 in order border to be visible. We recommend setting border color directly on a chart's DIV instead of using this property. #000000 */ borderColor: string; /** This prefix is added to all class names which are added to all visual elements of a chart in case addClassNames is set to true. */ classNamePrefix: string; /** Text color. #000000 */ color: string; /** Non-commercial version only. Specifies position of link to amCharts site. Allowed values are: top-left, top-right, bottom-left and bottom-right. @default 'top-left' */ creditsPosition: string; /** Array of data objects, for example: [{country:"US", value:524},{country:"UK", value:624},{country:"Lithuania", value:824}]. You can have any number of fields and use any field names. In case of AmMap, data provider should be MapData object. */ dataProvider: any[]; /** Decimal separator. @Default . */ decimalSeparator: string; /** Using this property you can add any additional information to SVG, like SVG filters or clip paths. The structure of this object should be ide