How to use lightweight-charts - 1 common examples

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 2 months ago

Package Health Score

89 / 100
Full package analysis

Popular lightweight-charts functions