plot_window 0.0.32 copy "plot_window: ^0.0.32" to clipboard
plot_window: ^0.0.32 copied to clipboard

outdatedDart 1 only

A library to use a canvas element to plot data

example/plot_window.dart

// Copyright (c) 2015, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:plot_window/plot_window.dart';
import 'dart:html';


main() {
  PlotWindow.Init();
  
  var plotWindow = new PlotWindow(querySelector('#mycanvas'));
  var line1 = new Line("line1", new PointList([new Point(1,2), new Point(2,5), new Point(3,-3), new Point(4, 2)]), color:new Color(255,0,0));

  var line2 = new Line("line2", new PointList([new Point(-3,3), new Point(-2,2), new Point(-1,3), new Point(0,2), new Point(1,1)]), color:new Color(0,0,255));
  line2.showLinearRegression= true;
  plotWindow..addLine(line1)
    ..addLine(line2);
  
  plotWindow.plot();
  
  /*
  plotWindow.pointSmoother = new PointSmoother(AverageMethod.ARITHMETIC, 1);
  plotWindow.plot();  */
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A library to use a canvas element to plot data

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

browser, dialog

More

Packages that depend on plot_window