@Bryan well…shit.
ok. let me see about taking another approach.
this could be nothing more than just a streak of bad luck on my part, but it feels like my custom marker has been getting borked with just about every single update. if i’ve been following the changelogs correctly, it seems like it’s coming down to more or less migrations of old code to a more streamlined and resilient architecture, which just happens to be breaking my beloved custom marker.
here’s my code:
from bokeh.util.compiler import JavaScript
from bokeh.models.glyphs import Marker
class BuySell(Marker):
__implementation__ = JavaScript("""
import {Marker, MarkerView} from "models/glyphs"
export class MyTriangleView extends MarkerView {
_render_one(ctx, i, r, line, fill) {
const h = r * Math.sqrt(3);
const a = h;
ctx.moveTo(-r, a);
ctx.lineTo(r, a);
ctx.lineTo(0, a - h);
ctx.closePath();
if (fill.doit) {
fill.set_vectorize(ctx, i);
ctx.fill();
}
if (line.doit) {
line.set_vectorize(ctx, i);
ctx.stroke();
}
}
}
export class BuySell extends Marker {
static __name__ = 'BuySell';
static init_BuySell() {
this.prototype.default_view = MyTriangleView;
}
}
BuySell.init_BuySell();
""")
the need for the custom marker was that the existing (or former, whichever) triangle glyph is anchored in the center, and i needed something that was anchored on one of the tips as more of a triangular pointer:
which you thought was a good idea, providing additional utility to the existing set of markers.
let’s say i would very much like to bring my custom marker in line with 2.4.0 capabilities. what would be the best way to go about that? as appreciative as i am of your continued assistance and input, i wouldn’t be terribly upset if i never had to log into this particular discourse ever again.