How to use the highcharts.Chart function in highcharts

To help you get started, we’ve selected a few highcharts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AugurProject / augur / src / modules / market / components / market-chart.jsx View on Github external
componentDidMount() {
    noData(Highcharts)

    Highcharts.setOptions({
      lang: {
        thousandsSep: ','
      }
    })

    this.marketPriceChart = new Highcharts.Chart('market_price_history_chart', {
      title: {
        text: null
      },
      chart: {
        height: 300 // mirror this height in css container height declaration
      },
      lang: {
        noData: 'No price history'
      },
      rangeSelector: { selected: 1 },
      xAxis: {
        type: 'datetime',
        title: {
          text: 'Time'
        }
      },
github opentok / opentok-network-test-js / sample / src / js / chart.js View on Github external
},
    {
      'from': 600000,
      'to': 2000000,
      'color': 'rgba(68, 170, 213, 0.1)',
      'label': {
        'text': 'Excellent',
        'style': {
          'color': '#606060',
          'fontSize': '8px'
        }
      }
    }]
  };

  return new Highcharts.Chart({
    chart: {
      type: 'spline',
      renderTo: mediaType + 'Graph',
    },
    title: {
      text: mediaType + ' bitrate stability',
      style: {
        fontSize: '14px'
      }
    },
    subtitle: {
      text: '',
      style: {
        fontSize: '12px'
      }
    },
github guardiangg / http-client / client / src / directive / chart.directive.ts View on Github external
ngOnInit() {
        if (this.chart) {
            this.chart.destroy();
        }

        if (!this.options.chart) {
            this.options.chart = {};
        }
        this.options.chart.renderTo = this.hostElement.nativeElement;
        this.chart = new Highcharts.Chart(this.options);
    }
github AugurProject / augur / packages / augur-ui / src / modules / portfolio / components / performance-graph / performance-graph.jsx View on Github external
chartSetup(callback = () => {}) {
    window.removeEventListener("resize", this.updateChartDebounced);

    Highcharts.setOptions({
      lang: {
        thousandsSep: ","
      }
    });
    const id = "performance_graph_chart";

    this.performanceGraph = new Highcharts.Chart(id, {
      title: {
        text: null
      },
      chart: {
        backgroundColor: "transparent",
        height: "220px",
        spacingLeft: 0,
        spacingRight: 0
      },
      events: {
        load() {
          this.customTexts = [];

          const text = this.renderer
            .text(
              "Responsive text",
github wri / gfw-mapbuilder / src / js / utils / charts.js View on Github external
makeBiomassLossChart: (el, options, callback) => {
		const {categories, series} = options;
		if (!callback) { callback = function(){}; }
		const chart = new Highcharts.Chart({
			chart: { renderTo: el },
			title: { text: null },
			credits: { enabled: false },
			xAxis: [{
				categories: categories, //years
				labels: { enabled: false }
			}],
			yAxis: [{
				labels: { enabled: false },
				title: { text: null }
			}, {
				labels: { enabled: false },
				title: { text: null },
				opposite: true
			}],
			tooltip: {
github toolkit-for-ynab / toolkit-for-ynab / src / extension / features / toolkit-reports / pages / spending-by-category / component.jsx View on Github external
y: subCategoryData.get('total'),
          transactions: subCategoryData.get('transactions'),
        })),
        events: {
          click: event => {
            showTransactionModal(event.point.name, event.point.transactions);
          },
        },
        id: masterCategoryId,
        innerSize: '50%',
        name: masterCategoryName,
        size: '80%',
      });
    });

    const chart = new Highcharts.Chart({
      credits: false,
      chart: {
        height: '70%',
        type: 'pie',
        renderTo: 'tk-spending-by-category',
        events: {
          drilldown: event => {
            chart.setTitle({ text: `${event.point.name}<br>${formatCurrency(event.point.y)}` });
            _this.setState({ currentDrillDownId: event.point.id });
          },
          drillup: () =&gt; {
            chart.setTitle({ text: `Total Spending<br>${formatCurrency(totalSpending)}` });
            _this.setState({ currentDrillDownId: null });
          },
        },
      },
github govau / datavizkit / src / hocs / withHighcharts.js View on Github external
const createFn = (options) => {
    chart = new Highcharts.Chart(options);
    return chart;
  };
github toolkit-for-ynab / toolkit-for-ynab / src / extension / features / toolkit-reports / pages / spending-by-payee / component.jsx View on Github external
showTransactionModal(event.point.name, event.point.transactions);
            },
          },
          id: payeeId,
          name: payeeName,
          transactions: spendingData.get('transactions'),
          y: payeeTotal,
        });
      } else {
        allOtherPayees.y += payeeTotal;
      }
    });

    seriesData.push(allOtherPayees);

    const chart = new Highcharts.Chart({
      credits: false,
      chart: {
        height: '70%',
        type: 'pie',
        renderTo: 'tk-spending-by-payee',
      },
      plotOptions: {
        series: {
          dataLabels: {
            formatter: function() {
              let formattedNumber = formatCurrency(this.y);
              return `${this.point.name}<br><span class="currency">${formattedNumber} (${Math.round(
                this.percentage
              )}%)</span>`;
            },
          },