Creating graphs in Indesign

Viewing 8 reply threads
  • Author
    Posts
    • #92080
      L L
      Member

      Is there a plug-in that allows you to create different types of graphs, ie pie charts, bar charts etc that your would normally create in Excel or programs of that nature?

      Thanks in advance for any help given.

    • #92097

      This might be of some help:

      https://creativepro.com/chartwell-typeface-update.php

      I haven’t used the font myself, only read about it on InDesignSecrets.

      Also check out the earlier description at:

      https://creativepro.com/creating-instant-charts-with-chartwell.php

    • #92168
      L L
      Member

      Thanks Chris,

      I am already using Chartwell but thank you for the help. It can be a little clunky at times so i was hoping that there was some other alternative.

      Thanks again for your help.

      Lisa

    • #92172

      Lisa, take a look at Claquos 2 | Pie Chart Builder for InDesign
      https://www.indiscripts.com/category/projects/Claquos

    • #92199
      L L
      Member

      Thanks Laros, that looks fantastic for pie charts. Do you know is there anything else as I need to create different styles of charts ie bar charts etc

      Lisa

    • #92205
      David Blatner
      Keymaster
    • #92214

      There are 2 free ones here, both are quite old but still working scripts:
      Pie Graph Tool
      Column and Bar Graph Tools

      https://www.sobolewski.biz/dtp/indy.html

    • #92262
      L L
      Member

      Laros they sound perfect but when I click on the download link and that takes me to Adobe Add-ons – I then can’t find either of them when I search! What am I doing wrong or are they no longer available?

      Thanks
      Lisa

    • #92350

      Lisa, here are the javascripts:

      /* ______________________________________
      | |
      _.———|.–. ColumnGraph.js v1.1 |
      .-‘ .’/ |
      .-‘ .’ | /| http://www.sobolewski.biz |
      .-‘ | / `.__// |
      .-‘ _.–/ / e-mail: [email protected] |
      | _ .-‘ / / |
      | ._ \ / ` / © 2005 by Mariusz Sobolewski |
      | . / / |
      | \ \ ‘/ /______________________________________|
      | – \ / /
      | ‘ .’ /
      | ‘ |.’
      | |
      | |
      | |.’
      | /
      | /
      | /
      ) /|
      .?/`-. / |
      ?????. `-._ / /
      ??????????. `-. / /
      ??????????????. `. /
      ??????????????????.`. /
      ????????????????????.`.
      ??????????????????????.`.
      ????????????????????????.
      ??????????????????????????.
      ???????????????????????????
      ??????????????????????????’

      */

      if (app.locale == 1279479916){ // Polish
      var txt_locale_1 = “Nie masz otwartych dokument\u00f3w!”;
      var txt_locale_2 = “Zaznacz jeden lub wi\u0119cej prostok\u0105t\u00f3w.”;
      var txt_locale_3 = “Zaznacz jeden lub wi\u0119cej prostok\u0105t\u00f3w.”;
      var txt_locale_4 = “Wykres kolumnowy”;
      var txt_locale_5 = “Warto\u015b\u0107 maksymalna:”;
      var txt_locale_6 = “Warto\u015b\u0107 kolumny “;
      }
      else { // Default to English
      var txt_locale_1 = “No documents are open!”;
      var txt_locale_2 = “Select one or more rectangles.”;
      var txt_locale_3 = “Select one or more rectangles.”;
      var txt_locale_4 = “Column Graph”;
      var txt_locale_5 = “Max. value:”;
      var txt_locale_6 = “Value for column “;
      }

      try{
      if (app.documents.length == 0){
      err(txt_locale_1);
      }
      if (app.documents.length != 0 && app.selection[0].constructor.name != “Rectangle”){
      err(txt_locale_2);
      }
      }
      catch(e){
      err(txt_locale_3);
      }

      var myRectangles = new Array();
      for (i = 0; app.selection.length – 1 >= i; i++) {
      myRectangles[i] = app.selection[i];
      }
      myRectangles.reverse();

      var myDialog = app.dialogs.add({name:txt_locale_4,canCancel:true});
      with(myDialog){
      with (dialogColumns.add()) {
      var myLabelA = staticTexts.add({staticLabel:txt_locale_5});
      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});

      var myLabel = new Array();
      for (i = 0; app.selection.length – 1 >= i; i++) {
      myLabel[i] = staticTexts.add({staticLabel:txt_locale_6 + (i+1) +”:”});
      }

      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});
      var CopyrightA = staticTexts.add({staticLabel:”\u00A9 2005 Mariusz Sobolewski”});
      }
      with (dialogColumns.add()) {
      var myMax_val = realEditboxes.add({editValue:0});
      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});

      var myBar_val = new Array();
      for (i = 0; app.selection.length – 1 >= i; i++) {
      myBar_val[i] = realEditboxes.add({editValue:0});
      }

      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});
      var CopyrightB = staticTexts.add({staticLabel:”\u2022 http://www.sobolewski.biz”});
      }
      }

      // Display the dialog box.
      if(myDialog.show() == true){

      // MAX VALUE OF THE GRAPH:
      var max_val = myMax_val.editValue;

      // var max_val = myRectangleGeometricBounds[2] – myRectangleGeometricBounds[0];
      var val_ratio = 100 / max_val;

      for (i = 0; i < myRectangles.length; i++){

      // geometricBounds array: 0 – top, 1 – left, 2 – bottom, 3 – right
      var myRectGeomBounds = myRectangles[i].geometricBounds;

      // CURRENT HEIGHT OF THE SELECTED BAR:
      var bar_full_height = myRectGeomBounds[2] – myRectGeomBounds[0];

      // VALUE FOR THE SELECTED BAR:
      var bar_val = myBar_val[i].editValue;

      // Percentage of the full bar
      var bar_height_percent = (bar_val * val_ratio) / 100;

      // Actual height of the bar
      bar_height_absolute = bar_height_percent * bar_full_height;

      // Calculate new value for the top geometric bound
      myRectGeomBounds[0] = myRectGeomBounds[2] – bar_height_absolute;

      myRectangles[i].geometricBounds = new Array(myRectGeomBounds[0], myRectGeomBounds[1], myRectGeomBounds[2], myRectGeomBounds[3]);
      }

      }
      else{
      myDialog.destroy()
      }

      // =========================================================================

      function err(e){
      alert(e);
      exit();
      }

      /*
      ColumnGraph.js
      Copyright (C) 2005 Mariusz Sobolewski
      e-mail: [email protected]
      http://www.sobolewski.biz

      This script is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version.

      This script is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
      */

      /* ______________________________________
      | |
      _.———|.–. BarGraph.js v1.1 |
      .-‘ .’/ |
      .-‘ .’ | /| http://www.sobolewski.biz |
      .-‘ | / `.__// |
      .-‘ _.–/ / e-mail: [email protected] |
      | _ .-‘ / / |
      | ._ \ / ` / © 2005 by Mariusz Sobolewski |
      | . / / |
      | \ \ ‘/ /______________________________________|
      | – \ / /
      | ‘ .’ /
      | ‘ |.’
      | |
      | |
      | |.’
      | /
      | /
      | /
      ) /|
      .?/`-. / |
      ?????. `-._ / /
      ??????????. `-. / /
      ??????????????. `. /
      ??????????????????.`. /
      ????????????????????.`.
      ??????????????????????.`.
      ????????????????????????.
      ??????????????????????????.
      ???????????????????????????
      ??????????????????????????’

      */

      if (app.locale == 1279479916){ // Polish
      var txt_locale_1 = “Nie masz otwartych dokument\u00f3w!”;
      var txt_locale_2 = “Zaznacz jeden lub wi\u0119cej prostok\u0105t\u00f3w.”;
      var txt_locale_3 = “Zaznacz jeden lub wi\u0119cej prostok\u0105t\u00f3w.”;
      var txt_locale_4 = “Wykres s\u0142upkowy”;
      var txt_locale_5 = “Warto\u015b\u0107 maksymalna:”;
      var txt_locale_6 = “Warto\u015b\u0107 s\u0142upka “;
      }
      else { // Default to English
      var txt_locale_1 = “No documents are open!”;
      var txt_locale_2 = “Select one or more rectangles.”;
      var txt_locale_3 = “Select one or more rectangles.”;
      var txt_locale_4 = “Bar Graph”;
      var txt_locale_5 = “Max. value:”;
      var txt_locale_6 = “Value for bar “;
      }

      //~ try{
      //~ if (app.documents.length == 0){
      //~ err(txt_locale_1);
      //~ }
      //~ if (app.documents.length != 0 && app.selection[0].constructor.name != “Rectangle”){
      //~ err(txt_locale_2);
      //~ }
      //~ }
      //~ catch(e){
      //~ err(txt_locale_3);
      //~ }

      var myRectangles = new Array();
      for (i = 0; app.selection.length – 1 >= i; i++) {
      myRectangles[i] = app.selection[i];
      }
      myRectangles.reverse();

      var myDialog = app.dialogs.add({name:txt_locale_4,canCancel:true});
      with(myDialog){
      with (dialogColumns.add()) {
      var myLabelA = staticTexts.add({staticLabel:txt_locale_5});
      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});

      var myLabel = new Array();
      for (i = 0; app.selection.length – 1 >= i; i++) {
      myLabel[i] = staticTexts.add({staticLabel:txt_locale_6 + (i+1) +”:”});
      }

      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});
      var CopyrightA = staticTexts.add({staticLabel:”\u00A9 2005 Mariusz Sobolewski”});
      }
      with (dialogColumns.add()) {
      var myMax_val = realEditboxes.add({editValue:0});
      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});

      var myBar_val = new Array();
      for (i = 0; app.selection.length – 1 >= i; i++) {
      myBar_val[i] = realEditboxes.add({editValue:0});
      }

      var mySpacer = staticTexts.add({staticLabel:”\u00A0″});
      var CopyrightB = staticTexts.add({staticLabel:”\u2022 http://www.sobolewski.biz&#8221;});
      }
      }

      // Display the dialog box.
      if(myDialog.show() == true){

      // MAX VALUE OF THE GRAPH:
      var max_val = myMax_val.editValue;

      // var max_val = myRectangleGeometricBounds[3] – myRectangleGeometricBounds[1];
      var val_ratio = 100 / max_val;

      for (i = 0; i < myRectangles.length; i++){

      // geometricBounds array: 0 – top, 1 – left, 2 – bottom, 3 – right
      var myRectGeomBounds = myRectangles[i].geometricBounds;

      // CURRENT LENGTH OF THE SELECTED BAR:
      var bar_full_length = myRectGeomBounds[3] – myRectGeomBounds[1];

      // VALUE FOR THE SELECTED BAR:
      var bar_val = myBar_val[i].editValue;

      // Percentage of the full bar
      var bar_length_percent = (bar_val * val_ratio) / 100;

      // Actual length of the bar
      bar_length_absolute = bar_length_percent * bar_full_length;

      // Calculate new value for the right-side geometric bound
      myRectGeomBounds[3] = myRectGeomBounds[3] – (myRectGeomBounds[3] – bar_length_absolute) + myRectGeomBounds[1];

      myRectangles[i].geometricBounds = new Array(myRectGeomBounds[0], myRectGeomBounds[1], myRectGeomBounds[2], myRectGeomBounds[3]);
      }

      }
      else{
      myDialog.destroy()
      }

      // =========================================================================

      function err(e){
      alert(e);
      exit();
      }

      /*
      BarGraph.js
      Copyright (C) 2005 Mariusz Sobolewski
      e-mail: [email protected]
      http://www.sobolewski.biz

      This script is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version.

      This script is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
      */

Viewing 8 reply threads
  • You must be logged in to reply to this topic.
>