Skip to content

Commit 3e763a1

Browse files
committed
fix font exception
1 parent 6c466c4 commit 3e763a1

17 files changed

Lines changed: 178 additions & 29 deletions

PHP_VERSIONS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
8.5
2-
8.4
3-
8.3
4-
8.2
51
8.1
2+
8.2
3+
8.3
4+
8.4
5+
8.5

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ composer require macocci7/php-boxplot
8989
$bp = new Boxplot();
9090
9191
$bp->setData($data)
92-
->create('img/BasicUsage.png');
92+
->create(__DIR__ . '/img/BasicUsage.png');
9393
```
9494
- Result:
9595

@@ -148,7 +148,7 @@ And Setting Caption can be done as follows:
148148
->labelY('Score')
149149
->caption('Achievement Test Results in 2023')
150150
->legends(['Donald Biden'])
151-
->create('img/AdjustDisplayByMethods.png');
151+
->create(__DIR__ . '/img/AdjustDisplayByMethods.png');
152152
```
153153

154154
- Result:
@@ -245,7 +245,7 @@ Multiple datasets can be displayed side by side at the same time.
245245
->labelX('Achievement Test')
246246
->labelY('Score')
247247
->caption('Achievement Test Results in 2023')
248-
->create('img/MultipleDataSet.png');
248+
->create(__DIR__ . '/img/MultipleDataSet.png');
249249
```
250250

251251
- Result: [examples/img/MultipleDataSet.png](examples/img/MultipleDataSet.png)
@@ -380,8 +380,8 @@ Second, Code PHP like this:
380380
use Macocci7\PhpBoxplot\Boxplot;
381381
382382
$bp = new Boxplot();
383-
$bp->config('AdjustDisplayByNeon.neon')
384-
->create('img/AdjustDisplayByNeon.png');
383+
$bp->config(__DIR__ . '/AdjustDisplayByNeon.neon')
384+
->create(__DIR__ . '/img/AdjustDisplayByNeon.png');
385385
```
386386
387387
Then, run the PHP Code.
@@ -449,7 +449,7 @@ You can Adjust the Display by using Array.
449449
450450
$bp = new Boxplot();
451451
$bp->config($conf)
452-
->create('img/AdjustDisplayByArray.png');
452+
->create(__DIR__ . '/img/AdjustDisplayByArray.png');
453453
```
454454
455455
- Result: [examples/img/AdjustDisplayByArray.png](examples/img/AdjustDisplayByArray.png)
@@ -492,7 +492,7 @@ You can set transparent background like this.
492492
->labelX('Examination')
493493
->labelY('Score')
494494
->caption('Transparent Background')
495-
->create('img/TransparentBackground.png');
495+
->create(__DIR__ . '/img/TransparentBackground.png');
496496
```
497497
498498
- Result: [examples/img/TransparentBackground.png](examples/img/TransparentBackground.png)
@@ -548,4 +548,4 @@ You can set transparent background like this.
548548
549549
***
550550
551-
Copyright 2023 - 2025 macocci7
551+
Copyright 2023 - 2026 macocci7

conf/Boxplot.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ validConfig:
4444
type: colorCode|null
4545
whiskerWidth:
4646
type: int
47-
fontPath:
48-
type: string
4947
fontSize:
5048
type: number
5149
fontColor:

conf/Plotter.neon

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ boxBorderColor: '#3333cc'
2121
boxBorderWidth: 1
2222
whiskerColor: '#3333cc'
2323
whiskerWidth: 1
24-
fontPath: 'fonts/ipaexg.ttf' # IPA ex Gothic 00401
24+
#fontPath: 'fonts/ipaexg.ttf' # IPA ex Gothic 00401
2525
#fontPath: 'fonts/ipaexm.ttf' # IPA ex Mincho 00401
2626
fontSize: 16
2727
fontColor: '#333333'
@@ -93,8 +93,6 @@ validConfig:
9393
type: colorCode|null
9494
whiskerWidth:
9595
type: int
96-
fontPath:
97-
type: string
9896
fontSize:
9997
type: int|float
10098
fontColor:

examples/AdjustDisplayByArray.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050

5151
$bp = new Boxplot();
5252
$bp->config($conf)
53-
->create('img/AdjustDisplayByArray.png');
53+
->create(__DIR__ . '/img/AdjustDisplayByArray.png');

examples/AdjustDisplayByMethods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
->labelY('Score')
2727
->caption('Achievement Test Results in 2023')
2828
->legends(['Donald Biden'])
29-
->create('img/AdjustDisplayByMethods.png');
29+
->create(__DIR__ . '/img/AdjustDisplayByMethods.png');

examples/AdjustDisplayByNeon.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
use Macocci7\PhpBoxplot\Boxplot;
66

77
$bp = new Boxplot();
8-
$bp->config('AdjustDisplayByNeon.neon')
9-
->create('img/AdjustDisplayByNeon.png');
8+
$bp->config(__DIR__ . '/AdjustDisplayByNeon.neon')
9+
->create(__DIR__ . '/img/AdjustDisplayByNeon.png');

examples/BasicUsage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
$bp = new Boxplot();
1616

1717
$bp->setData($data)
18-
->create('img/BasicUsage.png');
18+
->create(__DIR__ . '/img/BasicUsage.png');

examples/BoxplotExampleCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
$faker = Faker\Factory::create();
88
$bp = new Boxplot();
9-
$filePath = 'img/BoxplotExampleCase.png';
9+
$filePath = __DIR__ . '/img/BoxplotExampleCase.png';
1010

1111
$keys = [
1212
'5/21',

examples/DetmersReidBoxplot2023.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
$bp = new Boxplot();
1212
$csvUtil = new CsvUtil();
13-
$csvFileName = 'csv/672282_data.csv';
13+
$csvFileName = __DIR__ . '/csv/672282_data.csv';
1414
$dailyData = $csvUtil->getDailyData($csvFileName);
1515
if (!$dailyData) {
1616
echo "Failed to load CSV data.\n\n";
@@ -20,8 +20,8 @@
2020
$labels[] = preg_replace('/^\d+\-(\d+)\-(\d+)$/', '$1/$2', $datestring);
2121
}
2222

23-
$filePath01 = 'img/BoxplotDetmersReid2023_01.png';
24-
$filePath02 = 'img/BoxplotDetmersReid2023_02.png';
23+
$filePath01 = __DIR__ . '/img/BoxplotDetmersReid2023_01.png';
24+
$filePath02 = __DIR__ . '/img/BoxplotDetmersReid2023_02.png';
2525

2626
$bp
2727
->setData($dailyData)

0 commit comments

Comments
 (0)