回答編集履歴
4
デッドリンクの修正
answer
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
anspressで得たデータを、easyPieChartにはめこむだけでできるみたいです。
|
2
2
|
|
3
|
-
- [anspress の日本語化とか使い方を本気で書いてみる①](https://pro-- answer.com/adminblog/wordpress/anspress-1/
|
3
|
+
- [anspress の日本語化とか使い方を本気で書いてみる①](https://pro-- answer.com/adminblog/wordpress/anspress-1/)
|
4
4
|
- [EASY PIE CHARTの使い方](http://www.electric-fruits.com/creator-blog/easy-pie-chart201507/)
|
5
5
|
|
6
6
|
ここで、以下のPHP関数オブジェクトを記述するだけで、回答率などの数値を得ることができるので、
|
7
|
+
`<?php echo ap_total_posts_count( 'question', false, $UID )->total; ?> //総数`
|
7
|
-
`<?php echo ap_total_posts_count( 'answer', false )->total; ?>`
|
8
|
+
`<?php echo ap_total_posts_count( 'answer', false )->total; ?> //回答率`
|
8
9
|
|
9
10
|
これをeasyPieChartのpercentクラスの値に代入するだけです。もし、回答率が70%ならば、70という値が入るので、円グラフは70%を指すことになります。
|
10
11
|
```PHP
|
3
数値を具体的に明示
answer
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
- [anspress の日本語化とか使い方を本気で書いてみる①](https://pro-- answer.com/adminblog/wordpress/anspress-1/])
|
4
4
|
- [EASY PIE CHARTの使い方](http://www.electric-fruits.com/creator-blog/easy-pie-chart201507/)
|
5
5
|
|
6
|
-
ここで、以下の
|
6
|
+
ここで、以下のPHP関数オブジェクトを記述するだけで、回答率などの数値を得ることができるので、
|
7
7
|
`<?php echo ap_total_posts_count( 'answer', false )->total; ?>`
|
8
8
|
|
9
|
-
これをeasyPieChartに代入するだけです。
|
9
|
+
これをeasyPieChartのpercentクラスの値に代入するだけです。もし、回答率が70%ならば、70という値が入るので、円グラフは70%を指すことになります。
|
10
10
|
```PHP
|
11
11
|
<div class="chart" data-percent="<?php echo ap_total_posts_count( 'answer', false )->total; ?>">
|
12
12
|
<p class="percent"><?php echo ap_total_posts_count( 'answer', false )->total; ?></p>
|
2
%制御
answer
CHANGED
@@ -1,17 +1,14 @@
|
|
1
1
|
anspressで得たデータを、easyPieChartにはめこむだけでできるみたいです。
|
2
2
|
|
3
|
-
- anspress の日本語化とか使い方を本気で書いてみる①
|
4
|
-
[https://pro-answer.com/adminblog/wordpress/anspress-1/]
|
3
|
+
- [anspress の日本語化とか使い方を本気で書いてみる①](https://pro-- answer.com/adminblog/wordpress/anspress-1/])
|
4
|
+
- [EASY PIE CHARTの使い方](http://www.electric-fruits.com/creator-blog/easy-pie-chart201507/)
|
5
5
|
|
6
|
-
- EASY PIE CHARTの使い方
|
7
|
-
[http://www.electric-fruits.com/creator-blog/easy-pie-chart201507/]
|
8
|
-
|
9
6
|
ここで、以下の出力を記述するだけで、回答率などを得ることができるので、
|
10
|
-
<?php echo ap_total_posts_count( 'answer', false )->total; ?>
|
7
|
+
`<?php echo ap_total_posts_count( 'answer', false )->total; ?>`
|
11
8
|
|
12
9
|
これをeasyPieChartに代入するだけです。
|
13
10
|
```PHP
|
14
|
-
<div class="chart" data-percent="
|
11
|
+
<div class="chart" data-percent="<?php echo ap_total_posts_count( 'answer', false )->total; ?>">
|
15
12
|
<p class="percent"><?php echo ap_total_posts_count( 'answer', false )->total; ?></p>
|
16
13
|
</div>
|
17
14
|
```
|
1
リンク修正
answer
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
|
3
3
|
- anspress の日本語化とか使い方を本気で書いてみる①
|
4
4
|
[https://pro-answer.com/adminblog/wordpress/anspress-1/]
|
5
|
+
|
5
6
|
- EASY PIE CHARTの使い方
|
6
|
-
http://www.electric-fruits.com/creator-blog/easy-pie-chart201507/
|
7
|
+
[http://www.electric-fruits.com/creator-blog/easy-pie-chart201507/]
|
7
8
|
|
8
9
|
ここで、以下の出力を記述するだけで、回答率などを得ることができるので、
|
9
10
|
<?php echo ap_total_posts_count( 'answer', false )->total; ?>
|