plot_window 0.0.53

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 0

plot_window

A very simple, very buggy library to plot graphs on a canvas. I'll gradually add to it, so you probably shouldn't use this in any projects yet.

Usage

A simple usage example:

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

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

  var line2 = new plot_window.Line([new Point(-3,5), new Point(-2,4), new Point(-1,-2)], color:new plot_window.Color(0,0,255));

  plotWindow..addLine("line1", line1)
     ..addLine("line2", line2);

  plotWindow.plot();
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Initial version, created by Stagehand

0.0.2

  • Added x zoom with shift + mousewheel, y zoom with alt + mousewheel

0.0.3

  • Added mouse drag

0.0.4

  • Added legend

0.0.5

  • moved color to new file

0.0.7

  • added method removeLines()

0.0.8

  • bugfix

0.0.9

  • added fontSize and fontFace to PlotWindow

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' as pl;
import '../lib/plot_window.dart' as pl;
import 'dart:html';
import 'dart:math' as math;


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

  var line2 = new pl.Line("line2", new pl.PointList([new Point(-3,3), new Point(-2,2), new Point(-1,3), new Point(0,2), new Point(1,1)])); //, color:new pl.Color(0,0,255));
  line2.showLinearRegression= true;
  plotWindow..addLine(line1)
    ..addLine(line2);
  
    plotWindow.plot(); 
    /*
  var rand = new math.Random();
  var data = new List<List<num>>();
  for (int i=0; i<20; i++) {
    data.add(new List<num>());
    for (int j=0; j<100; j++) {
      data[i].add(j+i + rand.nextInt(20));
    }
  }

  var plotWindow = new pl.HeatmapPlotWindow(querySelector('#mycanvas'));
        var heatmap = new pl.Heatmap("my heatmap", 20, 20, data);
  plotWindow.heatmap = heatmap;
  plotWindow.plot();
    */
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  plot_window: ^0.0.53

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:plot_window/plot_window.dart';
  
Version Uploaded Documentation Archive
0.0.53 Aug 3, 2016 Go to the documentation of plot_window 0.0.53 Download plot_window 0.0.53 archive
0.0.52 Aug 3, 2016 Go to the documentation of plot_window 0.0.52 Download plot_window 0.0.52 archive
0.0.51 Aug 3, 2016 Go to the documentation of plot_window 0.0.51 Download plot_window 0.0.51 archive
0.0.50 Aug 1, 2016 Go to the documentation of plot_window 0.0.50 Download plot_window 0.0.50 archive
0.0.49 Jul 6, 2016 Go to the documentation of plot_window 0.0.49 Download plot_window 0.0.49 archive
0.0.48 Jun 27, 2016 Go to the documentation of plot_window 0.0.48 Download plot_window 0.0.48 archive
0.0.47 Jun 27, 2016 Go to the documentation of plot_window 0.0.47 Download plot_window 0.0.47 archive
0.0.46 Jun 6, 2016 Go to the documentation of plot_window 0.0.46 Download plot_window 0.0.46 archive
0.0.45 Jun 6, 2016 Go to the documentation of plot_window 0.0.45 Download plot_window 0.0.45 archive
0.0.44 Jun 6, 2016 Go to the documentation of plot_window 0.0.44 Download plot_window 0.0.44 archive

All 53 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0