mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-17 16:53:46 +00:00
More fluent for the api
This commit is contained in:
15
README.md
15
README.md
@@ -20,6 +20,21 @@ iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/dfi
|
|||||||
|
|
||||||
# What's new
|
# What's new
|
||||||
|
|
||||||
|
#### 4/7/2016
|
||||||
|
Made more methods fluent
|
||||||
|
```
|
||||||
|
$t=Get-Range 0 5 .2
|
||||||
|
|
||||||
|
$t2=$t|%{$_*$_}
|
||||||
|
$t3=$t|%{$_*$_*$_}
|
||||||
|
|
||||||
|
(New-Plot).
|
||||||
|
Plot($t,$t, $t,$t2, $t,$t3).
|
||||||
|
SetChartPosition("i").
|
||||||
|
SetChartSize(500,500).
|
||||||
|
Title("Hello World").
|
||||||
|
Show()
|
||||||
|
```
|
||||||
#### 3/31/2016
|
#### 3/31/2016
|
||||||
* Thanks to [redoz](https://github.com/redoz) Multi Series Charts are now working
|
* Thanks to [redoz](https://github.com/redoz) Multi Series Charts are now working
|
||||||
|
|
||||||
|
|||||||
14
plot.ps1
14
plot.ps1
@@ -122,9 +122,11 @@ class PSPlot {
|
|||||||
return $this
|
return $this
|
||||||
}
|
}
|
||||||
|
|
||||||
SetChartPosition($yCol) {
|
[PSPLot] SetChartPosition($yCol) {
|
||||||
$columnNumber = $this.GetColumnNumber($yCol)+1
|
$columnNumber = $this.GetColumnNumber($yCol)+1
|
||||||
$this.chart.SetPosition(1,0,$columnNumber,0)
|
$this.chart.SetPosition(1,0,$columnNumber,0)
|
||||||
|
|
||||||
|
return $this
|
||||||
}
|
}
|
||||||
|
|
||||||
AddSeries($xCol,$yCol,$yValues) {
|
AddSeries($xCol,$yCol,$yValues) {
|
||||||
@@ -194,12 +196,16 @@ class PSPlot {
|
|||||||
$this.SetChartSize(300,300)
|
$this.SetChartSize(300,300)
|
||||||
}
|
}
|
||||||
|
|
||||||
SetChartSize([int]$width,[int]$height){
|
[PSPlot] SetChartSize([int]$width,[int]$height){
|
||||||
$this.chart.SetSize($width, $height)
|
$this.chart.SetSize($width, $height)
|
||||||
|
|
||||||
|
return $this
|
||||||
}
|
}
|
||||||
|
|
||||||
Title($title) {
|
[PSPlot] Title($title) {
|
||||||
$this.chart.Title.Text = $title
|
$this.chart.Title.Text = $title
|
||||||
|
|
||||||
|
return $this
|
||||||
}
|
}
|
||||||
|
|
||||||
Show() {
|
Show() {
|
||||||
|
|||||||
Reference in New Issue
Block a user