How to use the smoothie.SmoothieChart function in smoothie

To help you get started, we’ve selected a few smoothie 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 afaqurk / linux-dash / src / js / linuxDash.js View on Github external
let start_rendering_line_chart = function () {

        if (!scope.color)
          scope.color = '0, 255, 0'

        let series, w, h, canvas

        angular.element($window).bind('resize', function() {
          canvas.width = w
          canvas.height = h
        })

        // smoothieJS - Create new chart
        let chart = new smoothie.SmoothieChart({
          borderVisible: false,
          sharpLines: true,
          grid: {
            fillStyle: '#ffffff',
            strokeStyle: 'rgba(232,230,230,0.93)',
            sharpLines: true,
            millisPerLine: 3000,
            borderVisible: false
          },
          labels: {
            fontSize: 11,
            precision: 0,
            fillStyle: '#0f0e0e'
          },
          maxValue: parseInt(scope.maxValue),
          minValue: parseInt(scope.minValue),
github karlcswanson / micboard / js / chart-smoothie.js View on Github external
millisPerPixel: 25,
    grid: {
      verticalSections: 0,
      strokeStyle: 'transparent',
      fillStyle: 'transparent',
    },
    labels: {
      disabled: true,
    },
    maxValue: 200,
    minValue: 0,
    // scaleSmoothing:.7,
    limitFPS: 0,
  };

  chart.slotChart = new SmoothieChart(chartOptions);

  if (micboard.MIC_MODELS.indexOf(data.type) > -1) {
    chart.audioSeries = new TimeSeries();
    chart.rfSeries = new TimeSeries();
    chart.slotChart.addTimeSeries(chart.audioSeries, {
      strokeStyle: '#69B578',
      fillStyle: '',
      lineWidth: 2,
    });

    chart.slotChart.addTimeSeries(chart.rfSeries, {
      strokeStyle: '#DC493A',
      fillStyle: '',
      lineWidth: 2,
    });
  } else if (micboard.IEM_MODELS.indexOf(data.type) > -1) {
github afaqurk / linux-dash / src / js / linuxDash.js View on Github external
link: function(scope, element) {

      let w, h, canvas

      angular.element($window).bind('resize', function() {
        canvas.width = w
        canvas.height = h
      })

      // smoothieJS - Create new chart
      let chart = new smoothie.SmoothieChart({
        borderVisible: false,
        sharpLines: true,
        grid: {
          fillStyle: '#ffffff',
          strokeStyle: 'rgba(232,230,230,0.93)',
          sharpLines: true,
          borderVisible: false
        },
        labels: {
          fontSize: 12,
          precision: 0,
          fillStyle: '#0f0e0e'
        },
        maxValue: 100,
        minValue: 0,
        horizontalLines: [{
github zircleUI / smarthome-tutorial / src / views / status.vue View on Github external
mounted () {
    // Random data
    var line1 = new TimeSeries()
    // Add random data points at irregular intervals
    var maxYValue = 10000
    var addValueLoop = function () {
      setTimeout(function () {
        // Generate a random value, centered around zero, raised to the power of 5
        // so that larger values occur less frequently
        var value = Math.pow(Math.random() * 2 - 1, 5) * maxYValue
        line1.append(new Date().getTime(), value)
        addValueLoop()
      }, Math.random() * 500)
    }
    addValueLoop()
    var smoothie = new SmoothieChart({
      grid: {
        strokeStyle: 'transparent',
        borderVisible: false
      },
      tooltip: true,
      labels: { disabled: true }
    })
    smoothie.addTimeSeries(line1, {
      strokeStyle: 'rgb(0, 255, 0)',
      fillStyle: 'rgba(0, 255, 0, 0.4)',
      lineWidth: 2
    })
    smoothie.streamTo(document.getElementById('smoothie-chart'), 100)
  }
}
github NeuroJS / angular-muse / src / app / time-series / time-series.component.ts View on Github external
  readonly canvases = Array(this.channels).fill(0).map(() => new SmoothieChart(this.options));
github getflywheel / local-addon-stats / src / SiteInfoStats.js View on Github external
startCPUChart () {

		this.cpuChart = new SmoothieChart({
			millisPerPixel: 100,
			interpolation: 'linear',
			grid: {
				strokeStyle: 'rgba(0,0,0,0.05)',
				verticalSections: 5,
				fillStyle: 'transparent',
				borderVisible: false,
				millisPerLine: 10000,
			},
			maxValue: 100,
			minValue: 0,
			yMinFormatter: function (min, precision) {
				return parseFloat(min).toFixed(precision) + '%';
			},
			yMaxFormatter: function (max, precision) {
				return parseFloat(max).toFixed(precision) + '%';
github karlcswanson / micboard / js / slot / chart.jsx View on Github external
initChart(data) {
    const chart = {};

    chart.slotChart = new SmoothieChart(chartOptions);

    if (MIC_MODELS.indexOf(data.type) > -1) {
      chart.audioSeries = new TimeSeries();
      chart.rfSeries = new TimeSeries();
      chart.slotChart.addTimeSeries(chart.audioSeries, {
        strokeStyle: '#69B578',
        fillStyle: '',
        lineWidth: 2,
      });

      chart.slotChart.addTimeSeries(chart.rfSeries, {
        strokeStyle: '#DC493A',
        fillStyle: '',
        lineWidth: 2,
      });
    } else if (IEM_MODELS.indexOf(data.type) > -1) {
github socketio / engine.io / examples / latency / public / index.js View on Github external
function render () {
  if (smoothie) smoothie.stop();
  $('chart').width = document.body.clientWidth;
  smoothie = new SmoothieChart();
  smoothie.streamTo($('chart'), 1000);
  time = new TimeSeries();
  smoothie.addTimeSeries(time, {
    strokeStyle: 'rgb(255, 0, 0)',
    fillStyle: 'rgba(255, 0, 0, 0.4)',
    lineWidth: 2
  });
}
github getflywheel / local-addon-stats / src / SiteInfoStats.js View on Github external
startMemoryChart () {

		this.memoryChart = new SmoothieChart({
			millisPerPixel: 100,
			interpolation: 'linear',
			grid: {
				strokeStyle: 'rgba(0,0,0,0.05)',
				verticalSections: 5,
				fillStyle: 'transparent',
				borderVisible: false,
				millisPerLine: 10000,
			},
			yMinFormatter: function (min, precision) {
				return parseFloat(min).toFixed(precision) + ' MiB';
			},
			yMaxFormatter: function (max, precision) {
				return parseFloat(max).toFixed(precision) + ' MiB';
			},
			labels: {

smoothie

Smoothie Charts: smooooooth JavaScript charts for realtime streaming data

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis