How to use the lightweight-charts.createChart function in lightweight-charts

To help you get started, we’ve selected a few lightweight-charts 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 bulwark-crypto / bulwark-explorer / client / component / ChartComponent.jsx View on Github external
precision: 2,
          formatter: (transactions) => `${transactions.toFixed(2)}%`
        }
        break;
      case TimeIntervalType.DailyNonRewardTransactionsCount:
        priceFormat = {
          type: 'custom',
          precision: 0,
          formatter: (transactions) => `${transactions.toFixed(0)} TXs`
        }
        break;
    }


    const chartElement = this.refs.chartElement;
    const chart = createChart(chartElement, { width: 1179, height: this.state.chartHeight });
    const lineSeries = chart.addLineSeries();

    lineSeries.applyOptions({
      priceLineVisible: false,
      priceLineWidth: 3,
      priceLineColor: '#294dea',
      priceLineStyle: 3,

      baseLineColor: '#294dea',

      priceFormat
    });
    this.setState({ chart, lineSeries });

    return chart;
  }

lightweight-charts

Performant financial charts built with HTML5 canvas

Apache-2.0
Latest version published 16 days ago

Package Health Score

92 / 100
Full package analysis

Popular lightweight-charts functions