// The AnyChart library (see https://www.anychart.com/) // // This passes json.data directly to the anychart.fromJson() function, // then asks it to draw that chart in the given element. // After the rendering is complete, we then resize the output element to // be large enough to contain the chart that has been created within it, // because CanvasJS does not do so automatically. // See the documentation here for details regarding the format: // https://docs.anychart.com/Working_with_Data/Data_From_JSON
window.VisualizationTools.anychart = function ( element, json, callback ) {
require( [ 'anychart' ], function ( dummy ) {
window.anychart.fromJson( json.data )
.container( element ).draw();
window.resizeToShowContents( element ); // The AnyChart SVGs don't auto-resize to fit contents, so we // do that manually as well.
$( element ).find( 'svg' ).each( function ( idx, elt ) {
$( elt ).height( $( elt.parentNode ).height() );
} );
callback( element, element.childNodes[0] );
} );
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.