3/17/2023 0 Comments Anychart redraw![]() The data property of the metadata will contain information about each point, rectangle, etc. This returned data has all of the metadata that is used to construct the chart. Looks for the dataset that matches the current index and returns that metadata. This is used internally for 'dataset' mode highlighting Looks for the element under the event point, then returns all elements from that dataset. This is used internally for 'label' mode highlighting Calling getElementsAtEvent(event) on your Chart instance passing an argument of an event, or jQuery event, will return the point elements that are at that the same position of that event. Looks for the element under the event point, then returns all elements at the same data index. ![]() An array is used to keep a consistent API between the get*AtEvent methods. The value returned from this method is an array with a single parameter. If there are multiple items within range, only the first is returned. The legend is generated from the legendCallback in the options.Ĭalling getElementAtEvent(event) on your Chart instance passing an argument of an event, or jQuery event, will return the single element at the event position. Returns an HTML string of a legend for that chart. This returns a base 64 encoded string of the chart in it's current state. Used extensively internally between animation frames, but you might find it useful. This is run each time the canvas container is resized, but you can call this method manually if you change the size of the canvas nodes container element. Use this to manually resize the canvas element. This will pause the chart during any current animation frame. Use this to stop any current animation loop. update(config) for more details on the config object. Note, this does not update elements for new data. A new animation can then be triggered using update. Reset the chart to it's state before the initial animation. This is useful when update is manually called inside an event handler and some different animation is desired. A config object can be provided with additional configuration for the update process. This will update all scales, legends, and then re-render the chart. This can be safely called after updating the data object. This must be called before the canvas is reused for a new chart. This will clean up any references stored to the chart object within Chart.js, along with any associated event listeners attached by Chart.js. ![]() Use this to destroy any chart instances that are created. Called in the context of the chart and passed the event and an array of active elements. Called in the context of the chart and passed the event and an array of active elements (bars, points, etc).Ĭalled if the event is of type mouseup or click. The events option defines the browser events that the chart should listen to for tooltips and hovering. Override the window`s default devicePixelRatio. Gets passed two arguments: the chart instance and the new size. Note that this option is ignored if the height is explicitly defined either as attribute or via the style.Ĭalled when a resize occurs. width / height, a value of 1 representing a square canvas). Maintain the original canvas aspect ratio (width / height) when resizing.Ĭanvas aspect ratio (i.e. Resizes the chart canvas when its container does ( important note.).ĭuration in milliseconds it takes to animate to new size after a resize event. ![]() The options are: line, bar, horizontalBar, radar, doughnut, pie, polarArea, bubble and scatterĪllows to define a callback for an event (parameter) of type change binded to the canvas.Īllows to define a callback for an event (parameter) of type click binded to the canvas.Īllows to define a callback for an event (parameter) of type mouseover binded to the canvas.Īllows to define a callback for an event (parameter) of type mouseout binded to the canvas. They have different attributes and can include different child components, so you can customize the way you display your data. The Charts are the main containers of your component. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |