Code refactor to use single engine task to execute query in chart
builder live preview