How to use the highcharts.setOptions 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 / account / components / profit-loss-chart / profit-loss-chart.jsx View on Github external
componentDidMount() {
    const { id, isMobile } = this.props;
    noData(Highcharts);

    Highcharts.setOptions({
      lang: {
        thousandsSep: ","
      }
    });

    const containerId = "profit_loss_chart_container" + id;
    const chartId = "profit_loss_chart" + id;
    // calculate horizontal margins, if mobile 0, else default
    const horizontalMargins = isMobile ? 0 : null;
    // determine height based on mobile or not
    let height = isMobile ? 260 : 170;
    // if the width of container is going to be <= height use 9/16 aspect ratio
    if (this.refs[containerId].clientWidth <= height) {
      height = (9 / 16) * 100 + "%";
    }
github dynatrace-oss / barista / src / lib / chart / chart.ts View on Github external
window.highchartsGlobalOptions = ((): void => {
  setOptions(DT_CHART_DEFAULT_GLOBAL_OPTIONS);
})();
// Highcharts global options, set outside component so its not set every time a chart is created
github dynatrace-oss / barista / components / chart / src / chart.ts View on Github external
window.highchartsGlobalOptions = ((): void => {
  setOptions(DT_CHART_DEFAULT_GLOBAL_OPTIONS);
})();
// Highcharts global options, set outside component so its not set every time a chart is created
github govau / datavizkit / src / components / withHighcharts.js View on Github external
subtitle: {
    style: {
      display: 'block',
      right: 0,
      // width: '100%; !important',
      marginBottom: '20px',
      fontSize: '12px',
      lineHeight: 1.5,
      fontWeight: 300,
      color: '#596371',
    },
  }
  /*eslint-enable */
};

Highcharts.setOptions({
  ...THEME
});


const withHighcharts = Composed => {
  return class extends Component {

    constructor(props) {
      super(props);
      this.create = this.create.bind(this);
      this.redraw = this.redraw.bind(this);
      this.destroy = this.destroy.bind(this);
      this._instance = null;
    }

    shouldComponentUpdate(nextProps, nextState) {
github SayakMukhopadhyay / elitebgs / src / app / services / theme.service.ts View on Github external
private setHighchartTheme() {
        const currentOptions = Highcharts.getOptions();
        for (const property in currentOptions) {
            if (typeof currentOptions[property] !== 'function') {
                delete currentOptions[property]
            }
        }
        Highcharts.setOptions(this.defaultHighchartsTheme);
        Highcharts.setOptions(this.theme.highcharts as any);
    }
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
      },
github IndomaximTechID / storaji-ui / src / app / main / dashboard / dashboard-routing.module.ts View on Github external
export function HighchartsFactory() {
  Highcharts.setOptions({
    colors: ['#39f', '#ccc']
  });
  return Highcharts;
}