Ipsita Dutta
Ipsita Dutta

Reputation: 11

How to add chart title, xtitle and ytitle in chart while using the Run KQL query and render a chart connector in Azure Logic app?

I am using the Run KQL query and render a chart action of the Azure Data Explorer connector but I am not able to add the render properties title, xtitle and ytitle with it.

cluster('').database('').Commit
| where CommitterDate > ago(30d)
| where (AuthorEmail == "@{variables('UPN')}" or CommitterEmail == "@{variables('UPN')}" or PushedByUniqueName == "@{variables('UPN')}")
| summarize ['Number of Commits'] = count() by bin(CommitterDate, 1d)
| render timechart with(title="Commit Trend for UPN", xtitle="Date of Commit", ytitle="Number of Commits")

I was expecting to have labels in the chart title and x and y axis of the plotted graph.

Upvotes: 1

Views: 518

Answers (1)

RithwikBojja
RithwikBojja

Reputation: 11393

How to add chart title, xtitle and ytitle in chart while using the Run KQL query and render a chart connector in Azure Logic app?

In logic apps you will get json which you can sue in ploting graph like below and followed SO-Thread:

enter image description here enter image description here

rithtable
|project Id,Name,Age,marks
| evaluate python(typeof(plotly:string),
```if 1:
    import plotly.graph_objects as go
    fig =  go.Figure(data=[go.Scatter(x=df['Id'], y=df['Name'])])
    plotly_obj = fig.to_json()
    result = pd.DataFrame(data = [plotly_obj], columns = ["plotly"])
```)

Output:

enter image description here

For this to run you need to have python installed in your cluster.

Upvotes: 0

Related Questions