Fossil SCM

Add class tags to elements of the piechart so that they can be configured using CSS. Add appropriate CSS markup to the xekri skin. Merge the xekri skin into trunk.

drh 2015-05-16 11:48 trunk merge
Commit f1dd937c20ae61faeae4c9a1b3795a5fadbcbb7f
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -202,10 +202,17 @@
202202
}
203203
204204
div.content table[bgcolor="white"] {
205205
color: #000;
206206
}
207
+
208
+.piechartLabel {
209
+ fill: white;
210
+}
211
+.piechartLine {
212
+ stroke: white;
213
+}
207214
208215
/**************************************
209216
* Main Area: Footer
210217
*/
211218
@@ -1022,6 +1029,5 @@
10221029
}
10231030
/* odd table row color */
10241031
tr.row1 {
10251032
/* Use default */
10261033
}
1027
-
10281034
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -202,10 +202,17 @@
202 }
203
204 div.content table[bgcolor="white"] {
205 color: #000;
206 }
 
 
 
 
 
 
 
207
208 /**************************************
209 * Main Area: Footer
210 */
211
@@ -1022,6 +1029,5 @@
1022 }
1023 /* odd table row color */
1024 tr.row1 {
1025 /* Use default */
1026 }
1027
1028
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -202,10 +202,17 @@
202 }
203
204 div.content table[bgcolor="white"] {
205 color: #000;
206 }
207
208 .piechartLabel {
209 fill: white;
210 }
211 .piechartLine {
212 stroke: white;
213 }
214
215 /**************************************
216 * Main Area: Footer
217 */
218
@@ -1022,6 +1029,5 @@
1029 }
1030 /* odd table row color */
1031 tr.row1 {
1032 /* Use default */
1033 }
 
1034
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -202,10 +202,17 @@
202202
}
203203
204204
div.content table[bgcolor="white"] {
205205
color: #000;
206206
}
207
+
208
+.piechartLabel {
209
+ fill: white;
210
+}
211
+.piechartLine {
212
+ stroke: white;
213
+}
207214
208215
/**************************************
209216
* Main Area: Footer
210217
*/
211218
@@ -1022,6 +1029,5 @@
10221029
}
10231030
/* odd table row color */
10241031
tr.row1 {
10251032
/* Use default */
10261033
}
1027
-
10281034
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -202,10 +202,17 @@
202 }
203
204 div.content table[bgcolor="white"] {
205 color: #000;
206 }
 
 
 
 
 
 
 
207
208 /**************************************
209 * Main Area: Footer
210 */
211
@@ -1022,6 +1029,5 @@
1022 }
1023 /* odd table row color */
1024 tr.row1 {
1025 /* Use default */
1026 }
1027
1028
--- skins/xekri/css.txt
+++ skins/xekri/css.txt
@@ -202,10 +202,17 @@
202 }
203
204 div.content table[bgcolor="white"] {
205 color: #000;
206 }
207
208 .piechartLabel {
209 fill: white;
210 }
211 .piechartLine {
212 stroke: white;
213 }
214
215 /**************************************
216 * Main Area: Footer
217 */
218
@@ -1022,6 +1029,5 @@
1029 }
1030 /* odd table row color */
1031 tr.row1 {
1032 /* Use default */
1033 }
 
1034
+5 -4
--- src/piechart.c
+++ src/piechart.c
@@ -201,11 +201,12 @@
201201
h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
202202
}
203203
zClr = rgbName(h,SATURATION,VALUE);
204204
l = x>=0.5;
205205
a1 = a2;
206
- @ <path stroke="%s(zFg)" stroke-width="1" fill="%s(zClr)"
206
+ @ <path class='piechartWedge'
207
+ @ stroke="black" stroke-width="1" fill="%s(zClr)"
207208
@ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
208209
}
209210
qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
210211
rUprLeft = height;
211212
rLwrLeft = 0;
@@ -249,14 +250,14 @@
249250
}else{
250251
x5 = x4 + 1.0;
251252
zAnc = "start";
252253
}
253254
y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
254
- @ <line stroke='%s(zFg)' stroke-width='1'
255
+ @ <line stroke-width='1' stroke='%s(zFg)' class='piechartLine'
255256
@ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
256
- @ <text text-anchor="%s(zAnc)"
257
- @ x='%g(x5)' y='%g(y5)' fill='%s(zFg)'>%h(p->z)</text>
257
+ @ <text text-anchor="%s(zAnc)" fill='%s(zFg)' class="piechartLabel"
258
+ @ x='%g(x5)' y='%g(y5)'>%h(p->z)</text>
258259
fossil_free(p->z);
259260
}
260261
db_finalize(&q);
261262
fossil_free(aWedge);
262263
}
263264
--- src/piechart.c
+++ src/piechart.c
@@ -201,11 +201,12 @@
201 h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
202 }
203 zClr = rgbName(h,SATURATION,VALUE);
204 l = x>=0.5;
205 a1 = a2;
206 @ <path stroke="%s(zFg)" stroke-width="1" fill="%s(zClr)"
 
207 @ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
208 }
209 qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
210 rUprLeft = height;
211 rLwrLeft = 0;
@@ -249,14 +250,14 @@
249 }else{
250 x5 = x4 + 1.0;
251 zAnc = "start";
252 }
253 y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
254 @ <line stroke='%s(zFg)' stroke-width='1'
255 @ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
256 @ <text text-anchor="%s(zAnc)"
257 @ x='%g(x5)' y='%g(y5)' fill='%s(zFg)'>%h(p->z)</text>
258 fossil_free(p->z);
259 }
260 db_finalize(&q);
261 fossil_free(aWedge);
262 }
263
--- src/piechart.c
+++ src/piechart.c
@@ -201,11 +201,12 @@
201 h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
202 }
203 zClr = rgbName(h,SATURATION,VALUE);
204 l = x>=0.5;
205 a1 = a2;
206 @ <path class='piechartWedge'
207 @ stroke="black" stroke-width="1" fill="%s(zClr)"
208 @ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
209 }
210 qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
211 rUprLeft = height;
212 rLwrLeft = 0;
@@ -249,14 +250,14 @@
250 }else{
251 x5 = x4 + 1.0;
252 zAnc = "start";
253 }
254 y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
255 @ <line stroke-width='1' stroke='%s(zFg)' class='piechartLine'
256 @ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
257 @ <text text-anchor="%s(zAnc)" fill='%s(zFg)' class="piechartLabel"
258 @ x='%g(x5)' y='%g(y5)'>%h(p->z)</text>
259 fossil_free(p->z);
260 }
261 db_finalize(&q);
262 fossil_free(aWedge);
263 }
264
+5 -4
--- src/piechart.c
+++ src/piechart.c
@@ -201,11 +201,12 @@
201201
h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
202202
}
203203
zClr = rgbName(h,SATURATION,VALUE);
204204
l = x>=0.5;
205205
a1 = a2;
206
- @ <path stroke="%s(zFg)" stroke-width="1" fill="%s(zClr)"
206
+ @ <path class='piechartWedge'
207
+ @ stroke="black" stroke-width="1" fill="%s(zClr)"
207208
@ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
208209
}
209210
qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
210211
rUprLeft = height;
211212
rLwrLeft = 0;
@@ -249,14 +250,14 @@
249250
}else{
250251
x5 = x4 + 1.0;
251252
zAnc = "start";
252253
}
253254
y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
254
- @ <line stroke='%s(zFg)' stroke-width='1'
255
+ @ <line stroke-width='1' stroke='%s(zFg)' class='piechartLine'
255256
@ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
256
- @ <text text-anchor="%s(zAnc)"
257
- @ x='%g(x5)' y='%g(y5)' fill='%s(zFg)'>%h(p->z)</text>
257
+ @ <text text-anchor="%s(zAnc)" fill='%s(zFg)' class="piechartLabel"
258
+ @ x='%g(x5)' y='%g(y5)'>%h(p->z)</text>
258259
fossil_free(p->z);
259260
}
260261
db_finalize(&q);
261262
fossil_free(aWedge);
262263
}
263264
--- src/piechart.c
+++ src/piechart.c
@@ -201,11 +201,12 @@
201 h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
202 }
203 zClr = rgbName(h,SATURATION,VALUE);
204 l = x>=0.5;
205 a1 = a2;
206 @ <path stroke="%s(zFg)" stroke-width="1" fill="%s(zClr)"
 
207 @ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
208 }
209 qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
210 rUprLeft = height;
211 rLwrLeft = 0;
@@ -249,14 +250,14 @@
249 }else{
250 x5 = x4 + 1.0;
251 zAnc = "start";
252 }
253 y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
254 @ <line stroke='%s(zFg)' stroke-width='1'
255 @ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
256 @ <text text-anchor="%s(zAnc)"
257 @ x='%g(x5)' y='%g(y5)' fill='%s(zFg)'>%h(p->z)</text>
258 fossil_free(p->z);
259 }
260 db_finalize(&q);
261 fossil_free(aWedge);
262 }
263
--- src/piechart.c
+++ src/piechart.c
@@ -201,11 +201,12 @@
201 h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
202 }
203 zClr = rgbName(h,SATURATION,VALUE);
204 l = x>=0.5;
205 a1 = a2;
206 @ <path class='piechartWedge'
207 @ stroke="black" stroke-width="1" fill="%s(zClr)"
208 @ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
209 }
210 qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
211 rUprLeft = height;
212 rLwrLeft = 0;
@@ -249,14 +250,14 @@
250 }else{
251 x5 = x4 + 1.0;
252 zAnc = "start";
253 }
254 y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
255 @ <line stroke-width='1' stroke='%s(zFg)' class='piechartLine'
256 @ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
257 @ <text text-anchor="%s(zAnc)" fill='%s(zFg)' class="piechartLabel"
258 @ x='%g(x5)' y='%g(y5)'>%h(p->z)</text>
259 fossil_free(p->z);
260 }
261 db_finalize(&q);
262 fossil_free(aWedge);
263 }
264

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button