I have a kql script that queries the table (csv format) at bottom and creates the line chart here:
Using kusto, is it possible to display text on one or more points, as in this line chart?
kql code
let stages=dynamic({
"stage1":1,
"stage2":2
});
let convert = (stage:string) {
toint(stages[stage])
};
//
let myracer = "dog";
let final_stage = "stage2";
//
let mylosses = ['dummy1']
| where Loser has myracer
| extend Stage_Num = convert(Stage)
| project Date, Stage_Num,Place
;
//
let mychampions = ['dummy1']
| where Stage has final_stage and Winner has myracer
| extend Stage_Num = toint(convert(Stage)+1)
| project Date, Stage_Num,Place
;
//
union mylosses, mychampions
| order by Date asc
| render linechart with (
legend = hidden, title = myracer,
ymin=0, ymax=4,
xcolumn=Place, xaxis=linear, xtitle="Location",
ycolumns=Stage_Num, ytitle="Stage"
)
;
Data
Place,Competition,Date,Stage,Winner,Loser
Place1,Race1,1/29/23,stage1,dog,cat
Place1,Race1,1/29/23,stage1,mouse,bird
Place1,Race1,1/30/23,stage2,dog,mouse
Place2,Race2,2/1/23,stage1,cat,dog
Place2,Race2,2/2/23,stage1,mouse,bird
Place2,Race2,2/3/23,stage2,cat,mouse
Place3,Race3,2/1/23,stage1,cat,bird
Place3,Race3,2/2/23,stage1,dog,mouses
Place3,Race3,2/3/23,stage2,cat,dog