How to create combo charts in Datylon for Illustrator

How to superimpose two or more charts and drive them with one data sheet in Datylon for Illustrator

 

Applies to: Datylon for Illustrator only

Introduction

Combining two or more charts can have different purposes: 

  • You want to create one chart with two axes. The second axis is then actually a second chart.
  • You want to combine two 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: Combo chart with two vertical axes using a line & bar chart 

In the below example, we will demonstrate all the above purposes in one single design by creating a combo chart with two axes. This by means of a line chart on top of a bar chart and driven by one data sheet.  

Step by Step

  1. Create or open an Illustrator document.
  2. Create a Datylon chart and select Column chart from the chart library.help-center-how-to-combine-multiple-charts-01
  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 two columns. One row is for the bar chart, the second one is for the line chart. It can look like this:
    help-center-how-to-combine-multiple-charts-02


  4. Make sure that the two charts will match:
    1. Set Styling > Position And Size > Plot Area to Fixed Position for both charts. Also set Margins to the same value.
      help-center-how-to-combine-multiple-charts-margins-bar
    2. Set the same axis Min and Max Values for both charts. For this example, go to X Axis > Min Value & Max Value. For the given data we'll set Min Value to 0 and Max Value to 90. help-center-how-to-combine-multiple-charts-03

  5. 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, select Line chart and then select type of line chart you want to use from the chart library.

    help-center-how-to-combine-multiple-charts-selecting-line-charthelp-center-how-to-combine-multiple-charts-04
  6. 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. Then bind Y-axis to the second column, here Value 2.
    help-center-how-to-combine-multiple-charts-05
  7. When this data sheet is selected the chart is crossed and the warning appears: "X" values should be of a type "number". This means that plugin is expecting the category to be a number. But in this case Category column is presented by categorical values (simply put text). To change X-axis type go to Styling > X Axis > Type and set it to Categorical
    help-center-how-to-combine-multiple-charts-x-axis-type
  8. Next bind Y to the values from the Values 2 column.
    help-center-how-to-combine-multiple-charts-06
  9. Make sure the margins for both charts are the same. Go to Styling > Positions And Size and change it. You can select correct chart by using the Illustrator Layers tab. 
    help-center-how-to-combine-multiple-charts-07
  10. Also don't forget to set min and max values for the Y-axis. Go to Styling > Y Axis > Min Value & Max Value. For the given data we'll set Min Value to 0 and Max Value to 90.
    help-center-how-to-combine-multiple-line-min-max-values
  11. 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).
    help-center-how-to-combine-multiple-charts-08
  12. Now let's turn on Y-axis for Line chart, turn on axis labels (Styling > Y axis > Labels) and apply Flip Location property to put the labels to the right sight of the chart. The gridline for Y-axis can be added only for one of the charts. In this case the gridline was added for the bar chart. help-center-how-to-combine-multiple-charts-09

  13. The final step is to color the line so it is visible. Go to Styling > Line > Stroke > Color and set a new color. And we're done!help-center-how-to-combine-multiple-charts-10