Deneb Template - Line Chart with curve smoothing

The standard line chart in Power BI can be used to display, among other things, a temporal value on the X-axis and a numerical value on the Y-axis for a set of categories. The points making-up each segment are joined by direct lines, which can lead to a “jagged” appearance. Included here is a Deneb template for a line chart that takes advantage of the curve smoothing available within Vega-Lite.

This template illustrates a number of Deneb/Vega-Lite features, including:

  • a title block setting additional display properties
  • configuring the line interpolation type (i.e., smoothing)
  • configuring the min and max (“domain”) of the Y-axis
  • configuring the approximate number of labels (“tickCount”) on the Y-axis
  • configuring the line colours
  • configuring characteristics of the automatically-generated legend (e.g., position, orientation, etc.)

The intent of this template is not to provide a finished visual, but rather to serve as a starting point for further custom visual development.

Also included is the sample PBIX using the Enterprise DNA Practice Dataset as a demo.

NOTE: This template is provided as-is for information purposes only, and its use is solely at the discretion of the end user; no responsibility is assumed by the author.

Greg
deneb.smooth_line_chart.0.2.json (2.2 KB)
Deneb Templates - Line Chart.pbix (1.7 MB)

6 Likes

Marked as solved

1 Like

Nice one, Greg! I’m actually currently working on a template for a Deneb Comet chart…my first one. Really Interesting stuff.

I also think @alexbadiu is getting into the Deneb game, so hopefully he will start posting here too.

  • Brian
1 Like

Hi @Greg
I don’t get what makes lines smooth.
I get a weird doodle when trying to use the same template.
Thanks
Roberto

{
“data”: {“name”: “dataset”},
“mark”: {
“type”: “line”,
“interpolate”: “natural”
},
“encoding”: {
“x”: {
“field”: “WeekEnding”,
“type”: “temporal”
},
“y”: {
“field”: “# Issues”,
“type”: “quantitative”,
“axis”: {“tickCount”: 5},
“color”: {“field”: “Project”}
}
}
}

Ooooh, comet charts are nice! :comet: :bar_chart:

1 Like

Hi @Roberto. Posting to an already-solved thread will often go unseen by the forum members and is discouraged; please create a new thread for all new questions.

That being said, you have the interpolate and temporal correct, but it looks like you’ve chosen an incorrect date field. The template works with a continuous, unique date column.

Hope that helps.
Greg

1 Like