@@ -132,6 +132,7 @@ def get_partial_filled_template(self):
132
132
split_anchors = [
133
133
"color" ,
134
134
"data" ,
135
+ "rev_order" ,
135
136
"shape" ,
136
137
"stroke_dash" ,
137
138
"tooltip" ,
@@ -208,6 +209,7 @@ def _process_optional_anchors(self, split_anchors: List[str]):
208
209
"group_by_y" ,
209
210
"group_by" ,
210
211
"pivot_field" ,
212
+ "rev_order" ,
211
213
"row" ,
212
214
"shape" ,
213
215
"stroke_dash" ,
@@ -221,6 +223,7 @@ def _process_optional_anchors(self, split_anchors: List[str]):
221
223
222
224
self ._fill_color (split_anchors , optional_anchors )
223
225
self ._fill_zoom_and_pan (split_anchors , optional_anchors )
226
+ self ._fill_rev_order (split_anchors , optional_anchors )
224
227
225
228
y_definitions = self .properties .get ("anchors_y_definitions" , [])
226
229
is_single_source = len (y_definitions ) <= 1
@@ -245,17 +248,25 @@ def _fill_color(self, split_anchors: List[str], optional_anchors: List[str]):
245
248
246
249
def _fill_zoom_and_pan (self , split_anchors : List [str ], optional_anchors : List [str ]):
247
250
name = "zoom_and_pan"
248
- encoding = {"name" : "grid" , "select" : "interval" , "bind" : "scales" }
249
- if "zoom_and_pan" not in optional_anchors :
251
+ if name not in optional_anchors :
250
252
return
251
253
252
- optional_anchors .remove ("zoom_and_pan" )
254
+ optional_anchors .remove (name )
253
255
254
- if name in split_anchors :
255
- self ._set_split_content (name , encoding )
256
+ self ._fill_split_anchor (
257
+ split_anchors ,
258
+ name ,
259
+ {"name" : "grid" , "select" : "interval" , "bind" : "scales" },
260
+ )
261
+
262
+ def _fill_rev_order (self , split_anchors : List [str ], optional_anchors : List [str ]):
263
+ name = "rev_order"
264
+ if name not in optional_anchors :
256
265
return
257
266
258
- self .template .fill_anchor (name , encoding )
267
+ optional_anchors .remove (name )
268
+
269
+ self ._fill_split_anchor (split_anchors , name , self .get_revs ())
259
270
260
271
def _process_single_source_plot (
261
272
self , split_anchors : List [str ], optional_anchors : List [str ]
@@ -421,6 +432,9 @@ def _fill_optional_anchor_mapping(
421
432
422
433
encoding = self ._get_optional_anchor_mapping (field , name , domain )
423
434
435
+ self ._fill_split_anchor (split_anchors , name , encoding )
436
+
437
+ def _fill_split_anchor (self , split_anchors : List [str ], name : str , encoding : Any ):
424
438
if name in split_anchors :
425
439
self ._set_split_content (name , encoding )
426
440
return
0 commit comments