score:2
I have previously built an application using Marionette and Highcharts so I think I can speak to this from some experience.
There's more than one way to go about this but in general unless you have some special reason you would just want to have one Marionette app running. I can't tell if you're trying to display two views at the same time in the same region but in case you are this is definitely not possible--as soon as you show the second view the first will be removed from the dom.
Anyways on to your questions: The simplest way (and the way I have done this) is to use an ItemView and draw the chart in the onRender() method. So it will look something like this:
var MyView = Marionette.ItemView.extend({
template: _.template('<div class="chart-container" style="height: 325px;"></div>'),
onRender: function() {
this.$('.chart-container').highcharts({
...highcharts options here
})
}
});
Then when you're ready to display it you'll create an instance and show it in the region:
var view = new MyView();
Graph1Manager.nameOfRegion.show(view);
Whenever you show another view in the region the previous one will automatically close so remember you'll have to create a new instance of it if you want to use it again...
Source: stackoverflow.com
Related Query
- x-axis, y-axis lines does not appear, when I include 3D chart library of HighChart in my code
- Remove Export and print button plugin on highchart chart
- How to export a Highchart chart to PDF thanks to a button outside the chart?
- How to create a new Highstock chart with new Highchart and not jquery?
- Highchart Area Range chart with gradient that follows the line
- Background color for multiple Highchart panes, in Vue app
- Highchart - Redraw Chart after Window is resized
- how to reset Highchart chart width in percentage on Button click
- highchart chart redraw method is not refreshing the chart
- Highchart Axis Update/ chart redraw
- How can I extend the lines of this Highchart series to the edges of my chart area?
- Adding a custom tooltip to a bubble chart / highchart
- How can I prevent my HighChart bar chart from being inverted?
- Produce dot chart in highchart
- Highchart columns chart overlaps yAxis.plotLines labels
- create a donut chart using highchart using jquery json object
- using angular directive to draw highchart pie chart but when i am using it in success function it is not working
- Customize Stacked column chart in highChart
- put the highchart legend to the bottom of the chart and horizontally centered
- Fire click event on a highchart column drilldown chart on clicking x axis for drill down reports
- Export chart image data locally in HIghchart
- Use MySQL data as the chart data for the cakephp highchart plugin
- I cant save my highchart chart data in localStorage
- How to add Legend in highchart compare stock chart
- Adding data to a highchart chart using an array with IDs
- Gauge chart Highchart dial style issue
- HighCharts Stock Chart error code 18
- Showing marker for separate values only in line chart in HIghchart
- Highchart showing indicator at last point for line chart
- hide a particular column on xAxis highchart Column Chart
More Query from same tag
- HighCharts disable y-axis label notation
- Implementing Prototype-style class structure with jQuery
- How to use Highcharts.Tooltip type in typescript
- Add tooltip to highcharts javascript
- Highcharts suddenly stop plotting
- highcharts: disable default buttons but keep custom button
- highstock: space between opposite x-axis and range-selector/datepicker
- HighCharts : dynamic data with drill down
- Highcharts Graph not recreating on same Android activity
- use material icons in highcharts
- How to show series dataLabels inside the Highchart pyramid in angular
- highcharts x-axis date issue
- shift y-axis from dumbell chart within the line
- How to change color on the Highchart Sparkline line only?
- Adding tool-tip to an image rendered using Highcharts Renderer.image() api
- Need to interpret JSON as variable
- Error in systemjs using angular2-highcharts
- How to replace cursor with crosshair in Highcharts React?
- Highcharts - How to sort data by name?
- Jquery Graph to display Engine Status
- Why do I have the issue 'property assigment expected' when I want to display a chart on my web page using highcharts
- How to make legend labels to bring out the series of a pie chart and not make them disappear when label is clicked in HighCharts?
- How to pull PHP function every second in JS/Ajax
- Fixing/discounting a data series when changing chart-type in Highcharts
- link 2 different types of highcharts data
- How can I get the top value of the yAxis labels in highcharts?
- Highcharts Dynamically Changing Labels?
- Highcharts and JSON parameters
- How to set different bar width in the same series Highchart
- How to get rid of 0 in X-axis