Creating a PixelPerfect chart with two different scales for the Y axis

You can use the rich options of PixelPerfect to create complex charts that do not exist in the original documents. For example, you can display two measures with different units on the Y axis on the same chart. In this example, QlikView objects are used to show how to create a chart to display category sales as a currency on the left scale, and as a quantity on the right scale.

Create a new PixelPerfect template and add a chart data source

Do the following:

  1. Select Reports in the Qlik NPrinting main menu, and then click Create report.
  2. Enter a Title for the report. PixelPerfect Two Scales Chart.
  3. Select PixelPerfect from the Type drop-down list.
  4. Select an app from the App drop-down list.
  5. Click Create to create the report.
  6. Click Edit template to open the Template Editor.
  7. Right-click the Tables node, and then select Add objects.
  8. Select the Connection to the QlikView document that contains the object you want.
  9. Select CH184 from the objects list.

Create a new chart

Do the following:

  1. Drag and drop a Chart object from the Tool Box into the Detail area template.

    The Chart Wizard opens.

  2. Select the Bar chart, and then click Next.
  3. In the Appearance window, click Next.
  4. Change the name of Series 1 to Gross Profit $ by entering it in the Series name box.
  5. Set Point sort order as Descending, and then set Sort points by to Value.
  6. Change the name of Series 2 to Gross Profit % by entering it in the Series name box.
  7. Click Next to open the Data window.

Bind data source

Do the following:

  1. In the Data window, click the Series Binding tab.
  2. Select the Gross Profit $ series.
  3. On the Argument drop-down list, expand the CH184 node, and then select the ProductName column.
  4. On the Value drop-down list, select the Gross Profit column.

  5. Select the Gross Profit % series.
  6. On the Argument drop-down list, select the ProductName column.
  7. On the Value drop-down list, select the GP% column.

  8. Click Next to open the Chart window.
  9. Click Next again to accept the default Chart settings, and to open the Diagram window.

Create a secondary Y-axis

Do the following:

  1. In the Diagram window, click the Elements tab.
  2. Click Add in the Secondary Y-Axis area.

    The Secondary AxisY 1 pane appears.

  3. Click Next.
  4. Click Next again to accept the default Panes settings, and to open the Axes window.

Set the primary X-axis options

Do the following:

  1. In the Axes window, click the Elements tab.

  2. Select Primary AxisX from the drop-down list.
  3. Enter Product Name into the Text box.
  4. Select the Visibility check box.
  5. Select the Antialiasing check box.

Set the primary Y-axis

Do the following:

  1. Select Primary AxisY from the drop-down list.
  2. Click the Elements tab.
  3. Enter Gross Profit $ in the Text box.
  4. Select the Visibility check box
  5. Select the Antialiasing check box

Set the primary Y-axis number format

Do the following:

  1. Click the Labels tab.
  2. Select the Auto tab.
  3. Select Currency from the Format drop-down list.
  4. Set the Precision to 0.

Set the secondary Axis-Y 1 option

Do the following:

  1. Select Secondary AxisY 1 from the drop-down list.
  2. Click the Elements tab.
  3. Enter Gross Profit % in the Text box.
  4. Select the Visible check box.
  5. Select the Antialiasing check box.

Set the secondary Axis-Y 1 number format

Do the following:

  1. Click the Labels tab.
  2. Click the Auto tab.
  3. Select Percent from the Format drop-down list.
  4. Set the Precision to 1.
  5. Click Next to open the Series Views window.

Connect Total Sales series with primary Axis-Y

Do the following:

  • In the Series Views window, leave the default Linked Elements for the Gross Profit $ series.

    This will connect the Gross Profit $ series with Primary AxisY.

Connect Quantity series with secondary Axis-Y 1

Do the following:

  1. Select the Gross Profit % series from the drop-down list.
  2. Select Secondary AxisY 1 from Axis Y drop-down list in Linked Elements.

    This will connect the Gross Profit % series to the Secondary AxisY 1.

  3. Click Next to open the Point Labels window.

Remove the point labels (values)

Do the following:

  1. In the Point Labels window, clear the Visible check box for Gross Profit $.

    This will remove the Point Labels (the values you see on the bars).

  2. From the top drop-down list, select Gross Profit %.
  3. Clear the Visible check box again.
  4. Click Finish to close the chart wizard.

Preview and save

Do the following:

  1. Click Preview.
  2. Check the report, close it, and then edit the template again if necessary.
  3. Click Save and Close to save the template and close the Template Editor.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?