• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Looking to create a script to automate a "fake a non-stacked area graph"

Community Beginner ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Hello everyone,

 

I've been tasked with creating a document for my company's customers that shows a bunch of pertinent metrics for each customer that prints out as a pdf.  Easy enough for most of the metrics.  The one thing I can't figure out is the graph - I've got a script basically setup to automate the actual graph creation that will save the file as a .ai that will then import into the Indesign file based on a naming convention - but my graph has one little hiccup that I can't figure out how to automate and I'm hoping the experts here may be able to help me.

 

The teams requesting the document didn't want a stacked area graph, but they also didn't want a simple line graph either, because they're hard to see on the page.  So when I did a mock-up version I ended up getting to what they did want by creating a line graph and then using the pen tool to basically turn the lines into area graphs (i.e. I filled the lines into and basically turned them into shapes) and laid them on top of the lines on the graph.  All fine and dandy when I thought I was only creating a small handful of these.  But (and I should have seen this coming) everyone else liked the documents so much that they've started requesting them too.  

 

As I mentioned, I've got 95% of this sorted with a script, I'm just not sure how to automate faking the "area" shape part at the end, especially considering each graph is going to be unique.  I absolutely do not want to have to do this manually.  Right now i'm sitting at about 50 customers they want this done for and this is a small part of my actual work, it can't take over my life.  Does anyone know of a way I can script an answer?

TOPICS
Draw and design , How-to , Scripting

Views

269

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 03, 2024 Sep 03, 2024

Oh great! Let me know how it works out. Here is a quick demo indesign doc with (roughly) your example data.

- Mark

 

P.S. I just now fixed a bug in that script, so please save it again. It wasn't setting the minimum value when it was zero.

emily-demo.gif

Votes

Translate

Translate
Adobe
Community Expert ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Your detailed description is commendable, but I think it would be helpful to provide some sketches that show what you are talking about.

 

Or even better, provide at least one sample Illustrator file with further instructions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Oops!  Forgot to actually attach the file - here is a sample set that I setup originally with the mocked up "fake area graph" part.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

well - trying to upload.  I always seem to have issues adding files on here.  Error says content type (application/postscript) does not match its file extension and has been removed for the .ai file, so here is a png version.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Hi Emily, because you mention that the graphs will be going straight into Indesign, I wonder if this idea might be useful for you. With that script you can (I think) quite easily achieve the overlayed line graph (with bottom fill) like you posted. Let me know if that is something you'd like more information about and I will post a demo document that reproduces your graph style.

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

Yes, I think that will work!  Thank you, this is amazing!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 03, 2024 Sep 03, 2024

Copy link to clipboard

Copied

LATEST

Oh great! Let me know how it works out. Here is a quick demo indesign doc with (roughly) your example data.

- Mark

 

P.S. I just now fixed a bug in that script, so please save it again. It wasn't setting the minimum value when it was zero.

emily-demo.gif

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines