跳到主要內容 跳至補充內容

Creating a PixelPerfect chart with automated series splitting

With series templates, you can create native PixelPerfect charts where the app data is automatically split into different series. This method is useful when you do not need to manually split the series yourself.

Requirements

Before you start creating a native PixelPerfect chart, you need to have a chart in your Qlik Sense app with a source table that adapts well to what you want to visualize. In the Qlik Sense chart, select the appropriate dimensions and measures to filter the data sufficiently from the app's data model.

The data you use for a native PixelPerfect chart has to be added as a table data binding. To create this type of data binding, use the Database icon with plus symbol Field List menu and add an item under Tables.

Creating an auto-split PixelPerfect chart

This process is similar to creating a chart with a user-defined series, but there are key differences. Notably, you use the same types of data bindings, but these are connected using a series template rather than by adding a series manually.

  1. Open the Database icon with plus symbol Field List menu available from the right-side panel in the designer.

  2. Click the plus icon next to Tables.

  3. From the available sheets, select the Qlik Sense chart you want to add as a table. Click the Plus icon next to it.

    The data binding is added.

  4. From the toolbox panel on the left side of the designer, drag a Chart Chart onto the design surface.

  5. Select the blank chart and then open the Gear Properties menu from the right side of the designer.

  6. Under Chart TasksData Member in the menu, select the table you added as a data binding.

  7. Inside the chart, click Run Designer....

    The Properties for the chart are shown on the right side.

  8. Select a field for Series Data Member. This sets the primary grouping for the chart. PixelPerfect automatically creates a new series for each distinct value in the field.

  9. Expand Series Template.

  10. To choose a chart type, select a value for View. The default is Bar. For a list of available charts, see Available chart types.

  11. For Argument Data Member, use the drop down menu to select a field containing the secondary data groupings.

  12. Expand Value Data Members. For Value, select a field containing the variable metrics you want to visualize. For certain advanced chart types (for example, Candle Stick chart), you might need to select more than one Value field.

    提示備註In this context, selecting the Value is similar to selecting a measure in Qlik Sense.
  13. When using a series template, it is often required to add summary functions to fulfill the aggregations specified in the chart. You need to set the summary options. Depending on the type of data you are using for your groupings, this might be labeled as one of the following:

    • Qualitative Summary Options

    • Numeric Summary Options

    • Date-Time Summary Options

    Expand the section.

  14. Expand Summary Function.

  15. Select a Function to use (for example, SUM).

  16. Select an Argument. This is usually the variable metric your chart is meant to visualize (for example, sales).

Additional tips for configuring the chart

The above workflow shows you how to create a native chart with automatically generated series, and connect it to Qlik Sense data sources. Here are some extra tips to help you make the most out of these charts.

Labels and legends

You might need to configure labels and legends so that they appear correctly.

Changing the text

You can change the text shown in the labels and legend. You can do this by entering specific placeholders for the following properties:

  • Labels: Open the Properties for the series, and add a placeholder to Label > Text Pattern.

  • Legend: Open the Properties for the series, and add a placeholder to Legend Text Pattern.

The placeholders instruct PixelPerfect to generate dynamic text with commonly needed values. For a chart with autogenerated series, the following are commonly used placeholders:

  • {S}

  • {A}

For a full list of placeholders you can use, see Text definition placeholders for native PixelPerfect charts.

Turning labels and legends off

If your chart has a lot of data, it is often preferred to turn labels off (they are turned on by default). To turn off labels for the chart, change the Labels Visibility setting in the Properties to False.

With auto-generated series, the chart legend can play a key role to help distinguish each series in the chart. However, if you want to turn the legend off, expand Legend and set Visibility to False.

Refreshing source data for data bindings

隨著時間的推移,來源圖表的設定可能會發生變更,需要您在 PixelPerfect 報告範本中採取動作。您可以在定義原生 PixelPerfect 圖表的資料繫結中重新整理來源應用程式資料。這在下列情況下十分實用:

  • 自從建立資料繫結以來,維度和量值已新增至來源圖表或從來源圖表中移除。

  • 自從建立資料繫結以來,已在來源圖表中變更維度和量值的定義。

重新整理資料繫結來源可讓您在 有加號的資料庫圖示 欄位清單功能表中保留相同的物件,而無需在圖表設定變更時建立新的物件。

  1. 開啟設計工具右側面板中提供的 有加號的資料庫圖示 欄位清單功能表。

  2. 按兩下表格以便展開。

  3. 將游標暫留在要重新整理的項目上。

  4. 按一下重新整理 (更新欄) 圖示。

    重新整理欄位清單功能表中的表格資料繫結

    按一下「更新欄」圖示以重新整理表格資料繫結
  5. 根據您的使用情況繼續進行範本開發。這可能涉及重新設定現有內容或新增內容。重新整理資料繫結後,新增的圖表欄現在可以從 有加號的資料庫圖示 欄位清單功能表中使用。

Available chart types

The following charts are shown as options when creating an auto-split PixelPerfect chart.

Example - Creating a multi-bar chart with auto-split series

請參閱此處的範例應用程式來源:範例材料 - 應用程式內報告。將應用程式和資料檔案上傳到空間,然後重新載入應用程式。您已準備好完成該範例。

This example shows you how to create a bar chart with automatically generated series for each value in a specific dimension.

Part 1: Add data binding and chart

  1. Create a new PixelPerfect template.

  2. Open the Database icon with plus symbol Field List menu available from the right-side panel in the designer.

    Field List menu in the PixelPerfect designer

    The 'Field List' menu expanded from the right side panel in the PixelPerfect designer
  3. Click the plus icon next to Tables.

  4. Expand the Sales Tables sheet, and click the Plus icon next to the Sales Details 2021-2023 chart.

    The data binding is added.

  5. From the toolbox panel on the left side of the designer, drag a ChartChart onto the Detail1 band.

    Blank chart added to template. The image also shows the data source that will be used to bind to the chart.

    Report template with a blank Chart object added, along with the 'Field List' menu expanded on the right side panel showing the data binding we will use to connect to the chart

Part 2: Connect the chart to data binding

  1. Select the blank chart and then open the Gear Properties menu from the right side of the designer.

  2. Under Chart TasksData Member in the menu, select the Sales Details 2021-2023 table.

  3. Inside the chart, click Run Designer....

    The Properties for the chart are shown on the right side.

  4. In the left panel in the Chart Designer, hover over Series and click the plus icon. In the menu, select Bar to create a bar chart series.

    The Properties for the new series are shown on the right side.

  5. For Series Data Member, select the Year field.

  6. Expand Series Template if not already expanded.

  7. For View, leave the chart type as Bar.

  8. For Argument Data Member, select Region field.

  9. Expand Value Data Members. For Value, select the Sales field.

  10. Next ,define the summary function to use. Expand Qualitative Summary Options.

  11. Expand Summary Function.

  12. For Function, select SUM.

  13. For Argument, select the Sales field.

Part 3: Refine the appearance

Finally, we want to hide the labels and arrange the data in descending order along the total sales for each dimension.

  1. Still in the Properties in Chart Designer, set Labels Visibility to False.

  2. Set Series Points Sorting to Descending.

  3. Set Series Points Sorting Key to Value.

  4. Add a title to the chart. In the left panel in the Chart Designer, hover over Titles and click the plus icon. Select a title position using the popup menu.

  5. In the Properties for the title, enter Yearly Sales By Region for the Text property.

  6. Click OK to exit the Chart Designer.

  7. Increase the size of the chart and the Detail1 band.

  8. In the top right corner, click Save template.

  9. Click Preview report. Download the report and open it.

Generated report showing a chart created using automated series splitting

Generated report showing a chart created using automated series splitting. In this case, the charts shows a bar chart with different series for each year in the data, also broken down by region values

此頁面是否對您有幫助?

若您發現此頁面或其內容有任何問題——錯字、遺漏步驟或技術錯誤——請告知我們!