GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. If nothing happens, download GitHub Desktop and try again. Go back. If nothing happens, download Xcode and try again. If nothing happens, download the GitHub extension for Visual Studio and try again. The plugin relies on a number of different libraries, to export images, draw annotations or generate download files.
|Published (Last):||17 March 2005|
|PDF File Size:||17.17 Mb|
|ePub File Size:||20.85 Mb|
|Price:||Free* [*Free Regsitration Required]|
The plugin relies on a number of different libraries, to export images, draw annotations or generate download files. If you are using relative url, note that it is relative to the web page you are displaying your chart on, not the export. Plugin includes a way to completely control what is displayed on export menu. You can set up menus, sub-menus, down to any level. You can even add custom items there that execute your arbitrary code on click.
The top-level menu is configured via menu property under export. It should always be an array, even if you have a single item in it. The array items could be either objects or format codes.
Objects will allow you to specify labels, action, icon, child items and even custom code to be executed on click. Please note that we have wrapped out menu into another menu item, so that only the icon is displayed until we roll over the icon.
This means that technically we have a two-level hierarchical menu. If we opmitted that first step, the chart would simply display a format list right there on the chart. Just like we set label and format properties for menu item, we can set click as well. In case you have an external legend you need to define the position where it should get placed in your export. By default it obtains the dimensions from the container but you can optionally overwrite those settings as shown below.
In case you need a more visible separation of your chart for further processing you can add an overlaying border. By passing the menuReviver callback function you can modify the resulting menu item or relative container, before it gets appended to the list ul. The function takes two arguments and it needs to return a valid DOM element. Some formats, such as CSV, have specific parameters that are used when exporting to this format. For example, default column separator for CSV is a comma. But what if you would like to be that a tab?
You could use menuReviver for that like this:. Adding menu item to print the chart or map is as easy as adding export ones. By default each menu item triggers some kind of export. You can add menu items to cancel, undo, redo and still be able to reuse the choices by using the actions draw. Since 1. You can easily adjust the choice of modes, colors, widths or shapes, and set the defaults when entering the annotation mode.
Following setup shows you all available settings. If you need to filter the drawn elements, you can pass the reviver method in your global configuration, or pass it to the capture method if you export manually. For example, to hide all free labels you can simply do something like the following:. In some cases you may want to delay the capturing of the current chart snapshot to highlight the current value. Since version 1. Use it to watermark your exported images.
Feel free to override any styles defined in it, create your own version and modify as you see fit. If you choose to modify it, we suggest creating a copy so it does not get overwritten when you update amCharts or plugin. The code is here for the explanatory purposes. The setter returns an array of objects, where each element represents an annotation. On the other hand the setter processes the given annotations within options options. Both methods support the reviver callback which allows you to modify the annotations if needed.
Unfortunately, Internet Explorer 9 has restrictions in place that prevent the download of locally-generated files. In this case the plugin will place the generated image along download instructions directly over the chart area.
This feature will kick in by default. If you want to disable it simply pass false to the fallback parameter. This plugin requires at least 3. Please let us know contact amcharts. Usage 1 Include the minified version of file of this plugin as well as the bundled CSS file. Loading external libraries needed for operation of this plugin The plugin relies on a number of different libraries, to export images, draw annotations or generate download files.
Those libraries need to be loaded for the plugin to work properly. There are two ways to load them. Configuring export menu Plugin includes a way to completely control what is displayed on export menu. Simple format codes will assume you need an export to that format. Advanced menu setup However, you can do so much more with the menu. Adding custom click events to menu items Just like we set label and format properties for menu item, we can set click as well.
This needs to be a function reference. Wow cool! Adding external legend In case you have an external legend you need to define the position where it should get placed in your export. Adding overlaying border In case you need a more visible separation of your chart for further processing you can add an overlaying border. Menu item reviver By passing the menuReviver callback function you can modify the resulting menu item or relative container, before it gets appended to the list ul.
Printing the chart Adding menu item to print the chart or map is as easy as adding export ones. Annotation settings Since 1. Delay the capturing before export In some cases you may want to delay the capturing of the current chart snapshot to highlight the current value.
Events Since version 1. A list of the events Name Arguments Description beforeCapture menu item setup Called before the SVG element gets converted afterCapture menu item setup Called right before the passed callback of the capture method. Each item in content represents either a text line string or an exported image. To include exported image, use image: "reference". Styling the export menu The plugin comes with a default CSS file export.
Plugin API We explained how you can define custom functions to be executed on click on export menu items. Annotation API Since version 1. Function Parameters Description getAnnotations object options, function callback Returns an array of objects where each element represents an annotation. Fallback for IE9 Unfortunately, Internet Explorer 9 has restrictions in place that prevent the download of locally-generated files.
Requirements This plugin requires at least 3. The export will also need relatively recent browsers. IE10 and up are supported. Partial support for IE9; Fallback mechanism. License This plugin is licensed under Apache License 2.
Contact us Email: contact amcharts. Changelog 1. Holds the messages to guide the user to copy the generated output; false will disable the fallback feature. A file name to use for generated export files an extension will be appended to it based on the export format. Places the legend in case it is within an external container skip to chapter.
A position of export icon. General setting to delay the capturing of the chart skip to chapter. Format to convert date strings to date objects, uses by default charts dataDateFormat data export only.
If true it observes the drag and drop feature and loads the dropped image file into the annotation. Object which holds all possible settings for the annotation mode skip to chapter. By default we use portrait, you can change it to landscape if you wish details. Flag to print the actual vector graphic instead of buffered bitmap print option only, experimental.
A numeric value to delay the capturing in seconds details.