I have a kql script that queries the table (csv format) at bottom and creates the line chart here:
Is it possible to display a line and/or the value for each y-axis value as in the below image? (extra lines and y-axis number values below were manually added using editor)
Query
let stages=dynamic({
"stage1":1,
"stage2":2,
"stage3":3,
"stage4":4
});
let convert = (stage:string) {
toint(stages[stage])
};
//
let myracer = "cat";
let final_stage = "stage4";
//
let mylosses = ['dummylong']
| where Loser has myracer
| extend Stage_Num = convert(Stage)
| project Date, Stage_Num,Place
;
//
let mychampions = ['dummylong']
| 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
Place1,Race1,1/30/23,stage3,dog,mouse
Place1,Race1,1/30/23,stage4,dog,mouse
Place2,Race2,2/1/23,stage1,cat,dog
Place2,Race2,2/1/23,stage1,mouse,bird
Place2,Race2,2/2/23,stage2,cat,mouse
Place2,Race2,2/2/23,stage3,cat,mouse
Place2,Race2,2/2/23,stage4,cat,mouse
Place3,Race3,2/3/23,stage1,cat,bird
Place3,Race3,2/3/23,stage1,dog,mouse
Place3,Race3,2/4/23,stage2,cat,dog
Place3,Race3,2/4/23,stage3,cat,dog
Place3,Race3,2/4/23,stage4,cat,dog
Place4,Race4,2/5/23,stage1,cat,bird
Place4,Race4,2/5/23,stage1,dog,mouse
Place4,Race4,2/6/23,stage2,cat,dog
Place4,Race4,2/7/23,stage3,cat,dog
Place4,Race4,2/8/23,stage4,cat,dog