How to combine multiple charts

How to combine 2 or more charts and drive them with 1 data sheet in Datylon for Illustrator

Applies to: Datylon for Illustrator only

Introduction

Combining 2 or more charts can have different purposes: 

  • You want to create one chart with 2 axes. The 2nd axis is than actually a 2nd chart.
  • You want to combine 2 charts e.g. a trend line on top of a bar chart.
  • You want to drive multiple charts with one datasheet so updating the data is more efficient. 

Example: Line and bar chart with 2 vertical axes

In the below example, we will demonstrate all the above purposes in one single design by creating a line chart on top of a bar chart, with 2 axes, ánd driven by one datasheet.  

Step by Step

  1. Create or open an Illustrator document.
  2. Create a Datylon chart and select Bar chart.Screen Shot 2020-04-04 at 13.51.48
  3. Upload or create a data sheet with data for both bar chart and line chart. In this example, the data is structured in rows, with 2 columns. One for the bar chart, one for the line chart. It can look like this:
    Screen Shot 2020-04-04 at 14.47.36

  4. Style the Bar chart. Give it a logical name and change chart orientation to vertical: Styling >
    Appearance > Properties > Chart orientation
    Capture-4
  5. To make sure the 2 charts will match, set the same Y-axis Min and Max Values for both charts. Go to Numerical Axis > Min Value & Max Value. For the given data we'll set Min Value to 0 and Max Value to 9000. Here we placed the Y axis on the right side of the of bars by enabling Flip Location.Screen Shot 2020-04-04 at 15.02.56
  6. Adjust Numerical Axis properties. Turn off the line, place axis labels to the right by changing horizontal alignment and horizontal offset. Change typeface and color of axis labels.Screen Shot 2020-04-04 at 15.09.59
  7. Now create the Line chart. To match the placement of bar chart and line, use the Illustrator menu Edit > Copy > Paste in Place. Now we have a copy of bar chart and a copy of the data sheet. Change chart type to line chart by clicking Select chart in the top right corner and then select Line chart. Don't forget to change the name of the chart. Screen Shot 2020-04-04 at 15.30.43
  8. Next step is to assign the same Data sheet to this Line chart. To do this click Manage Data and then select the Data sheet that was used for Bar chart and click Select sheet. And then bind Y axis to the 2nd column, here Sales 2.
    Screen Shot 2020-04-04 at 15.40.21Screen Shot 2020-04-04 at 16.18.22
  9. Make sure the margins for both chart are the same. Go to Styling > Positions and Margins and change if needed. You can select correct chart by using the Illustrator Layers tab. 
    Screen Shot 2020-04-04 at 16.13.13
  10. Now let's turn on Y axis for Line chart and apply same Min and Max Values that we applied for the Bar chart  – 0 and 9000. We'll adjust Y axis labels is the same way as we did for the Bar chart.Screen Shot 2020-04-04 at 16.23.08
  11. Now we'll turn on X axis of the Line chart. We can see that X-axis labels are not perfectly centered with the bars. To fix that we'll change Line chart X axis Outer padding to 35% (Styling > X Axis > Outer padding).Screen Shot 2020-04-04 at 16.29.40Screen Shot 2020-04-04 at 16.29.52
  12. Then add some colors to bars and lines by Styling > Bars > Color and Styling > Line > Stroke > Color. And we're done!Screen Shot 2020-04-04 at 16.47.24