How to do it…

  1. Open the Automotive.qvf app provided for Chapter 2Visualizations, and create a new sheet.
  2. Create a Bar chart on the sheet.
  3. Add Territory as the dimension.
  4. Add Total Car Sales as the measure.
  1. The resulting chart will look like the following screenshot:
  1. Adjust the Territory number visible at one time, changing the Limitation attribute in the Territory dimension with a fixed number of 10:
  1. Keep this dynamic, so the user can choose to see 10 or 20 territories.
  2. Open the variable editor, and click on Variables at the bottom of the left panel.
  1. Click on Create new to create a new variable.
  2. Set the name as vtopn and the definition with a default of 5.
  3. Click on Save (pencil button) at the top to save the variable.
  4. Click on Close to go back to the sheet editor.
  5. Next, click in the expression editor in the Fixed number as Limitation.
  6. Replace the fixed number with $(vtopn).
  7. Click on Apply.
  8. The resulting chart will look like the following screenshot:
  1. Next, we need to add the variable extension and set the correct parameters. Select Custom objects and search for variable extension.
  2. Drag and drop the extension at the top of the sheet. The bar chart will be resized to give space to the extension automatically.
  1. Now, in the property panel for Variable object, do the following:
    1. Set Name as vtopn.
    2. Change Show as to Slider.
    3. Set Min as 5 and Max as 20.
    4. Keep Step as 1.
    5. Select Slider label.
    6. In the General section, set Title with Choose Top Territories.
    7. Now, arrange the object's size in the sheet.
    8. Click on the Stop editing sheet icon to enter view mode.
  2. The resulting chart will look like the following screenshot:
  1. Drag the slider to the right to increase the number of visible territories. Drag it to the left to decrease it.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset