Copy link to clipboard
Copied
The task is to create my own chart in illustrator which would interact with spreadsheet programs similar to illustrator's existing charts. Is it possible? It seems like a scripting excersise, to define basic objects and layout parameters, then link one of those parameters (in this case circle diameter) to a prepared excel file with unique pixel-count measurements. One key part is that the chart needs to be updatable as the base data is changed.
Any ideas?
Ain't scripting fun. It was a breeze (well -- sort of) to get something up & running for InDesign ... Now translating it into the very different Javascript for Illustrator proved to be harder than I thought!
(Is there no way to vertically align a text into its frame? This is now sort-of, but it depends on the number of lines of text...)
Type in (or copy, or import) your values into a new text frame. Separate the label and the value by a single tab. The values will be sorted automatically, and the
...Copy link to clipboard
Copied
You would possibly be better taking a look at data driven graphics and using Illustrators 'variables' for doing this… Graphs are one of the options that you can make dynamic…
Copy link to clipboard
Copied
what kind of chart you need?
Copy link to clipboard
Copied
Michele,
The charting technique I want to (re)create is Jess Bachman's 'Death&Taxes' vis at wallstats.com (with his permission, which I have obtained). Specifically, it's using area-relative circles to compare government data, but a different government service, different country. I have already assembled test data and played with a few equations to give the right Px figures for use in adobe.
Jess assembled the vis using 700-odd layers in photoshop, according to an interview. There must be a more efficient way to permit illustrator to generate a vector chart that can loosely assemble a master and subordinate series of circles with various bits of text data displayed (also from spreadsheet), and a few graphical bits to tie the circles together.
Copy link to clipboard
Copied
Post an example. Can't visualize the nature of the graph based on your description.
Since you can script the creation of paths, positioning of symbols, etc., etc..., yes, technically speaking it could "probably be done" with script. But it would likely be a rather ambitious and tedious scripting project.
JET
Copy link to clipboard
Copied
The detailed example is Jess Bachman's 'death and taxes' visualization of the US discretionary budget.
Even if there was a way to script in an auto-adjust of circles that I had pre-arranged in a chart, saving the tedium of expressly setting each size individually.
Below is a sample of some data I'm using, modeled by hand using excel.
Equation is:
r=0.5 * px
pxSubordinate=sqrt(((pxParent*pxParent)*$subordinate)/$parent
The end result of this sample data looks like:

Copy link to clipboard
Copied
for dot-lines network visualizations i've used in the past software different from illustrator, such as http://www.cytoscape.org/ or http://gephi.org/.
These programs are able to read data from excel, create a visualization using differents visual variables (like dot size, color...) and then export it in a pdf.
The two programs are both free and open source.
This solution make you able to quickly generate the visualization and then clean up in ai.
another way to solve your problem is to write a small script with scriptographer (http://scriptographer.org/).
The simpliest way is to import a series of values from excel and create a series of circles based on the values.
Copy link to clipboard
Copied
Michele,
Thank you for the first two links. I'll have a closer look at them soon.
I've been to scriptographer earlier this year, but other work items took my attention away from them. Would you suggest scriptographer over adobe's own scripting?
As far as your last comment, I suspect generating circles based on imported data is simple enough to learn, but it's the twist with updating the sizes via some sort of 'sync' function or similar. The data is far more detailed than the one sub-sample I offered above.
I found another post here that may be helpful-do you agree?
Copy link to clipboard
Copied
hi, sorry if i haven't answer earlier but this week i have a lot fo work.
the post you've pointed to is perfect if you want to create a script illustrator.
as i wrote above, i prefer use scriptographer becouse i find it fastest and easier to use.
With scriptographer you must use a couple of java function to import the csv.
I tought to try to write it, but up to now i hadn't time
if you can wait, maybe in the weekend
Copy link to clipboard
Copied
I'm in no big rush-I've been contemplating this one for months now amid the rest of the associated project.
Copy link to clipboard
Copied
There must be a more efficient way to permit illustrator to generate a vector chart that can loosely assemble a master and subordinate series of circles with various bits of text data displayed (also from spreadsheet), and a few graphical bits to tie the circles together.
This is quite an interesting challenge for Illustrator and Javascript and a lot of math thrown in -- enough to lure me away from my usual InDesign shenanigans!
(a) Your sample image shows a 2-level diagram, but am I to understand you have more levels than this?
(b) Can you supply the numerical data corresponding to the sample image? (I.e., given that input, the script ought to create the image out of nothing.)
(c) Are the graphs to be created a one-shot, or should it be possible to 'update' the finalized image? (Note: usually, it's far more easier to just throw away *everything* and generate an entirely new image. However, if you plan on doing some finalizing stuff -- adjusting text, fonts, colors, drop shadow or other effects -- all of that will be lost.
But it's far harder to 'update' an existing image with new data; it might even not be possible at all. I'm just saying.)
I cannot make any solid promises, but it sure looks like a fair challenge.
(Unless anyone is interested in mazes-for-Illustrator ...?
)
Copy link to clipboard
Copied
@Jongware
(a) Yes, this was just a sub-sample of the data for one year. In full, the data covers expenses of a government department branch from 1981 to present, less a couple years in-between, including approximately 5,000 figures and metadata. The chart would represent the expense for one year alone, so perhaps several dozen data points per year until 1998, and then a dramatic increase in data given a different datasource (I could condense data for consistency with the earlier data)
(b) The data itself for the sample visualization is as follows, transcribed from a spreadsheet. Parent and subordinates noted for clarity:
| Individual totals | 1981/2 ($000s) | px | r |
| Fisheries Research (parent) | 6446.6 | 100.00 | 50.00 |
| Fresh & Anadromous (subordinate) | 1175.4 | 42.70 | 21.35 |
| Groundfish (subordinate) | 2268.2 | 59.32 | 29.66 |
| Invertebrates (subordinate) | 821.9 | 35.71 | 17.85 |
| Marine Mammals (subordinate) | 450.1 | 26.42 | 13.21 |
| Pelagic Fish (subordinate) | 1151.9 | 42.27 | 21.14 |
| Fisheries Ecology (subordinate) | 579.1 | 29.97 | 14.99 |
All 'px' values, other than those of the parent value, are generated from the equations noted earlier and again below.
All 'r' values (radius) are 1/2 of the px value.
subordinate px=sqrt(((parent px*parent px)*SubordinateAnnualExpense)/ParentAnnualExpense)
(c) I suppose, with enough work beforehand, the generated chart would come all at once and then be inserted into a template after I finish data quality. Initially I thought a means to update would be good, but that could throw off other edits required as you suggest.
The end result would be a collection of posters, one per year. An even more entusiastic goal is a web-based interactive tool with varying levels of detail as the user clicks, and an animated year-by-year showing each given expense grow or shrink with spending (or appear/dissapear as appropriate).
I had planned to learn this scripting myself, but I was under the impression that it was as easy as other scripting, none of which I've learned yet. Are you offering to take a stab at it? I'm not one to argue if so!
Copy link to clipboard
Copied
Ain't scripting fun. It was a breeze (well -- sort of) to get something up & running for InDesign ... Now translating it into the very different Javascript for Illustrator proved to be harder than I thought!
(Is there no way to vertically align a text into its frame? This is now sort-of, but it depends on the number of lines of text...)
Type in (or copy, or import) your values into a new text frame. Separate the label and the value by a single tab. The values will be sorted automatically, and the largest value will appear in the center; the rest will be distributed nicely around the edge. I noticed my mathematical distribution is not exactly the same as the sample you provided ... even when allowing for a pixel here or there. I wonder why?
For better or for worse, this is what it produces -- the first sub-item will always be at a 45 degrees angle, the rest is separated from each other by an exact distance of 5 points.

and here is the script:
//DESCRIPTION:Krazy Circular Diagrams
// A Jongware Script 24-Sep-2010
// Uses a tab-separated set of String / value data
// which ought to be selected when running the script.
// Use but do not abuse, please.
if (app.documents.length == 0 || app.selection.length != 1 || !(app.selection[0].hasOwnProperty("baseline") || app.selection[0].hasOwnProperty("contents")))
{
alert ("Please select the text frame containing data");
} else
{
var dataArray;
var resultGroup;
var parent_diameter = 100;
var parent_position_x = app.activeDocument.activeView.centerPoint[0];
var parent_position_y = app.activeDocument.activeView.centerPoint[1];
var black = new GrayColor(); black.gray = 100;
var white = new GrayColor(); white.gray = 0;
dataArray = gatherValues(app.selection[0]);
if (dataArray.length == 0)
alert ("Unable to get sensible values .. please check");
else
{
calculateValues ();
resultGroup = app.activeDocument.groupItems.add();
drawCircles(resultGroup);
}
}
function gatherValues (fromItem)
{
var result = new Array();
var l, line, lines, dataSource;
if (fromItem.hasOwnProperty("baseline"))
dataSource = fromItem.parentStory.contents;
else
dataSource = fromItem.contents;
lines = dataSource.split ("\r");
for (l=0; l<lines.length; l++)
{
line = lines
if (line.length == 2)
{
if (!isNaN(Number(line[1])))
result.push ([line[0], Number(line[1])]);
}
}
result.sort (sortByValue);
return result;
}
function calculateValues ()
{
var v;
// Calculate size per circle
for (v=0; v<dataArray.length; v++)
{
dataArray
}
}
function drawCircles (addToGroup)
{
var color_p = new RGBColor();
var color_c = new RGBColor();
// Parent colors, in RGB
color_p.red=80;
color_p.green=130;
color_p.blue=190;
// Child colors, in RGB
color_c.red=74;
color_c.green=172;
color_c.blue=197;
// Draw parent circle
drawCircleAt (addToGroup, parent_position_x, parent_position_y, dataArray[0], color_p);
// Draw the other circles.
// First one starts at -45 degrees (0 degrees is straight to the right)
circleAngle = 45;
// The center of the circle is at parent_diameter/2 + (distance) + own_diameter/2
centerDistance = parent_diameter/2 + 5 + dataArray[1][2]/2;
for (nextCircle=1; nextCircle<dataArray.length; nextCircle++)
{
// and this is Math 1-0-1: finding its center position using the angle 🙂
cx = parent_position_x + Math.cos(Math.PI * circleAngle/180)*centerDistance;
cy = parent_position_y + Math.sin(Math.PI * circleAngle/180)*centerDistance;
drawCircleAt (addToGroup, cx, cy, dataArray[nextCircle], color_c, parent_position_x,parent_position_y,parent_diameter/2, circleAngle);
if (nextCircle < dataArray.length - 1)
{
// Advance angle to make space for next circle.
// Let's type this while thinking, shall we?
// We have:
// a line from parent_center to child_center A at angle alpha
// radius of A (actually, diameter, but we don't care)
// radius of B (as above)
// some distance to put between A and B
// rad_A + distance + rad_B -> position of center of B (anywhere)
// oh, and distance from parent_center to child_center B is the same as to child_center A!
// checking on Wikipedia, http://en.wikipedia.org/wiki/Law_of_sines
// yields something like this ...
angle_diff = Math.asin ( ((dataArray[nextCircle+1][2]/2 + 5 + dataArray[nextCircle][2]/2)/2) / centerDistance); // in Radians
angle_diff = 2*angle_diff * 180 / Math.PI; // in Degrees
circleAngle = circleAngle - angle_diff;
}
}
}
function drawCircleAt (group, xpos, ypos, textAndSize, color, lineto_x, lineto_y, parentRad, angle)
{
var tframe, line;
// The connexion line, if any
if (lineto_x != undefined && lineto_y != undefined && parentRad != undefined)
{
angle = Math.PI * angle / 180.0;
line = group.pathItems.add();
line.setEntirePath ( [[lineto_x + parentRad*Math.cos(angle),lineto_y + parentRad*Math.sin(angle)], [xpos - textAndSize[2]/2*Math.cos(angle),ypos - textAndSize[2]/2*Math.sin(angle)]]);
line.filled = false;
line.stroked = true;
line.strokeWidth = 0.5;
line.strokeColor = black;
}
// The Circle
circle = group.pathItems.ellipse (ypos+textAndSize[2]/2, xpos-textAndSize[2]/2, textAndSize[2], textAndSize[2]);
circle.strokeColor = black;
circle.strokeWidth = 0.5;
circle.fillColor = color;
// The Text Frame
tframe = app.activeDocument.pathItems.rectangle(ypos+textAndSize[2]/6, xpos-textAndSize[2]/2, textAndSize[2], textAndSize[2]/2);
tframe = group.textFrames.areaText(tframe);
tframe.contents = textAndSize[0];
tframe.wrapInside = false;
tframe.wrapped = false;
tframe.textRange.hyphenation = false;
tframe.textRange.justification = Justification.CENTER;
tframe.textRange.textFont = app.textFonts.getByName("MyriadPro-Regular");
tframe.textRange.characterAttributes.size = textAndSize[2]/6;
tframe.textRange.fillColor = white;
}
function sortByValue (a,b)
{
a = Number(a[1]);
b = Number(b[1]);
return (a == b) ? 0 : (a < b ? 1 : -1);
}
Copy link to clipboard
Copied
You've got to be kidding-you just threw this thing together in a few hours?
How about the tiered data issue? I described the total data in my previous post, but omitted the number of layers. In total for a given year, the data could stack up to 4 tiers, including overall expenses for the given division. From 1998 to current, 5 or 6 tiers may be included. It looks like this script will suit for only a single step in data?
I'll play with it tomorrow. Cheers!
Copy link to clipboard
Copied
you just threw this thing together in a few hours?
Sure. The underlying math is not too difficult, it's more the logic of the connexions I had to work out.
I checked out the artistic poster you referred to, and boy! now there was someone with way too much time on his hands ![]()
Multilevel is sort of a two-tier problem. How do you want to specify the input data? A simple list won't do anymore ... The other problem lies in how to determine a good position for the sub-level. Even only two layers is a problem:
-- this was done manually, by trial and error. If the Marine Mammals had just one item more it would bump into Fisheries Ecology. (Fortunately I ran out of ideas after 'mermaids', and these are only half mammal anyway.)
At this point, the script would leave the terra firma of Math 1-0-1 and enter the wide realm of data visualization, graphing theory, and (emh) some more difficult things which I cannot recall top of head.
So I don't think you can expect a script to generate as much as four levels totally automatic ...
I can add a simple dialog to set the starting angle for the first circle, and perhaps I can think of a few more options.
Copy link to clipboard
Copied
I've tried it and replicated the original script-it took a little troubleshooting until I found that the script doesn't like numbers with commas (anything over 999.99)
Could I rearrange the data or add some manner of an indicator to 'tell' the script that a given datum represents the next step up or down? I had previously converted the data to px values in a spreadsheet-would referencing those values simplify the process?
If not-any alternative method to generate the single-step charts as above, then scale them appropriately for the next tier up or down? It would involve manual repositioning-to a crippling degree?...there's got to be some way to pull this off. I can slice and dice the base data any which way to help it fit a script.
Lastly-what method does illustrator use to 'attach' objects together, so that if we manually move a generated circle, the attached parent and/or child lines remain attached, without moving the other circles?
Brilliant of you to offer what you have thus far.
Copy link to clipboard
Copied
Well, for starters it's very kind of you to think along! (Apart from proposing this challenge in the first place, that is.)
About the data. The problem is it's not really a linear list, but more of a tree of ever increasing detail. So there isn't really a straightforward way to input the data.
One possible way to input multi-level data would be working with multiple tabs, like this:
Fish mongeries
Mammals
Sea-dwelling 12
Land-dwelling 34
Fish
Appetizing 15
Edible 20
Ghastly 40
Fruit
Apples
Elstar 15
- etc. Note how you don't have to specify a 'running total' per category and sub-category. As I understand Jess' graph and your example, the total of the sub-categories is the actual value of the category proper -- thus the size of the 'parent' circle --, and adding all of these categories' totals together will result in an even larger super-circle.
Now that's one option, and with that data one could build an entire graph from scratch. Alter the data, delete the old graph, and create a new one. Good for a one-shot graph, not so good if you moved stuff around, changed colors and fonts, etc.
The other option is to store the category data -- names and numbers -- into the graphic objects -- the circles. That has the advantage that you can format every circle and its associated text in any way you want, and all the script has to do is scale and reposition the existing circles. The downside, then, is you cannot immediately "see" and edit the associated data per circle, you'd need another script to do this. (Objects in InDesign have this property 'label', which can hold just about any string or numerical data, and can be inspected and altered from within the program itself. But I have this little theory the programmers of InDesign and Illustrator don't get along very good, and refuse to coordinate even the most basic things.)
I'd have to look deeper into this, but it might well be possible to combine these two workflows: generate a graph anew if given only textual data, and adjust positions and scales when given a file that already contains a graph.
About the graph itself.
If you look to Jess' graph in close detail, you will see that not all of his circles and sub-circles have the rigid layout you show in your sample. For clarity, he moved entire sub-structures away from the center, with just a long connecting line attaching the two. There is simply no way you can put that much smarts into a script ... Mainly because it's an algorithm's worst nightmare, but also because there is a certain degree to artisticness to it.
I was already planning a next step in the script, which is the observation that the size of a parent circle is not a given (your initial "100 pixels"), but it's rather the other way around. If you point to a circle and tell the script, "I want sublevels for this one, with these numeric parameters", the script could automatically calculate the original area. As I said above, the running total for a main category should not be given, but rather just be the total of all of its sub-categories. Divide x by y, and you got yourself a scale ratio for the subordinate circles.
This means that, if necessary, you could construct the entire graph manually, by first feeding it the data for generating the 'level 1' graph, then feed it the data for all successive sub-levels, selecting each of the sub-circles as new parent for each.
(I'd have to try to see if this works
)
About groups of data.
Unfortunately, Illustrator cannot create "elastic lines" -- a line that is attached to two objects and stretches and bends as you move the two objects around (neither can InDesign ... sometimes I could use that!). This means that the only way to group parent-and-subcircles together is by physically making them into a group. The problem ... that 'parent' circle (and its co-grouped subcircles) is going to be a sub-circle of a larger parent, to which it also should be grouped. At the end of the line, you'd have one big supermassive grand-grand-grandparent circle, and every one of the other circles is grouped together with that one, rendering the entire concept of grouping the sub-circles totally ineffective.
It's even harder when you created a main set of circles and then decided (in an artistic way) to move one of the sub-circles out of the way, to make room for a set of sub-sub-circles of another circle. If the script gets re-run and that sub-circle (the one you moved) appears on an entirely different position than before, your entire data-set is off. I'd have to think about this, but I feel like there is no real satisfying solution.
Copy link to clipboard
Copied
.. the script doesn't like numbers with commas (anything over 999.99).
I had to read that twice until it dawned on me... Computers in general don't like numbers with comma's! A value of 1,000,000 makes no sense to any calculator (not to the large majority of them, in any case). It's like typing in "1 billion" and expecting the computer to think "oh, he's from Europe, so with 1 billion he actually means 1 trillion".
I could make the script work fine on comma-separated thousands by having it adjust the numbers before they get processed, but frankly it's such a mean task ... It also brings up another challenge of its own: what if you type in 1,24.5? Should that number be rejected because it's "not a valid number"? ![]()
Copy link to clipboard
Copied
Here is the next step; I honestly don't think I can push it any further, but fellow scripters are invited to build onto this!
It's also getting a bit on the large side to comfortably post in here, so I've put it as KrazyCircles.zip onto my website.
Improvements:
1. All comma's are ignored in the numbers ![]()
2. If the first data line doesn't contain a tab-and-number, the total of the following numbers is used.
3. If you have a circle selected -- together with the data text frame --, the center circle will not be drawn (at all -- not even its title). Instead, the selected circle is used as the base for the next graph. That way you can chain graphs together.
4. It has a dialog! A quick explanation:

Distance to parent: the length of the connector between the parent circle and the largest subordinate one.
"Fixed" checkbox: if unchecked, the centers of all subordinate circles are at the same distance from the parent circle. If checked, the distance is the same for all -- the one in the above box.
Inter-children distance: I reviewed my math
and now it should work correctly! It's the distance between two successive subordinate circles.
Start angle: the initial angle of the first drawn circle, where 0 is right and 90 is down (I think).
"Clockwise" checkbox: the subcircles are drawn largest to smallest in clockwise fashion. If unchecked, the subcircles get drawn the other way around.
OK: obvious, methinks!
Cancel: ditto ![]()
Copy link to clipboard
Copied
To get around the comma issue, I just removed the commas-problem solved
I never thought I'd have something to work with just a day or two later, and now that I see it I am confident I would have been months to complete what you tossed together out of entertainment. Kudos!
I'll poke around with it Monday. This weekend is cleanup from Hurricane Igor-many down trees, still lucky to have power.
Copy link to clipboard
Copied
I had a go at making it "interactive" using Juerg Lehni's Scriptographer (which you will need to download and install first! Only then download and install ScriptoCircleDiagram into Scriptographer's own Scripting folder).
It has a few problems, some because of my limited programming acumen (it appears sometimes settings aren't properly reset when creating two diagrams right after each other), and some because of limitations of Scriptographer (it seems you cannot make the interactive panel automatically update when you select another object, so it needs a 'read settings' button).
Nevertheless, it does two things the plain Illustrator version does not: it stores the data into the graph group itself, and you can interactively adjust existing diagrams -- select, then press the "Read settings" button, then adjust.
It shows the limits of what can be scripted: you cannot change anything in the graph, because if you move the items around using the script, the graph will be destroyed and created a-new; and you cannot ungroup a diagram, because then all data will be lost, and it'll become a 'dumb' set of objects. And you still have to build a multi-level object one level at a time.
So it's just for fun -- creating a moderately complicated diagram is possible, but you'll soon run into these limitations.
The more I try, the more I'm convinced an Illustrator-only solution is not feasible. I'm inclined to think you need a totally custom solution, written in, for example, Flash or Java. A custom solution should be able to:
1. Import (and optionally, export) tabular data in a layered tree form.
2. Enable you to change the data after it's entered into the program.
3. Draw a basic diagram from this data.
4. Allow you to alter individual circle positions, formatting, style, colors, etc. and store the changes per circle, so they can be reapplied when the graph needs regenerating.
5. Automatically stretch and shrink the connector lines when you move entire sub-diagrams out of the way ...
6. And finally ... export the graph to a format that can be read by Illustrator, for the final purely artistic touches.
Copy link to clipboard
Copied
This is great, really fantastic work. I would never have figured all these quirks out before the new year, and probably a continued struggle into the next.
I was familiar with scriptographer from an earlier attempt to generate this chart. Does the following
link and discussion offer much of use?
As for your two creations, I've tried both and created single-step simple diagrams with the data arranged as discussed earlier (in a textbox, single tab btwx title and data).
I completely understand what you meant about flipping the order of math to use only the smallest values available, generating each parent circle based on the sum value (instead of providing that sum itself). Would nothing work for additional steps in the data? Tabbing over and removing the 'sum' values for various parent categories I thought was your plan from an earlier post, but it only generates errors.
In the scriptographer example, I couldn't effect changes on the chart via the 'Read Settings' tab. A bit confused on that one-once the chart is generated, it cannot be changed?
I can work with what's there, for single-steps. Just now I need to figure out a workaround to handle the multiple tiers of data, even if it generates a single chart that needs rearranging of plain objects afterward to fix overlaps, text issues, colors, etc, it should still be far, far simpler than manually creating every circle for every year.
Below is the remainder of data for one year, also one of the least complex datasets. Words in bold are a parent category, those not in bold immediately below are within the bold group above. A final total for the branch is at the bottom. How should I rearrange this data to fit the scripts? I can adapt for later year sets.
http://scriptographer.org/forum/help/importing-data-freeform-charting/
| Individual totals, in $000s | 1981/2 |
| Fisheries Research Administration | 1153.7 |
| Director's Office | 316.1 |
| Scientific Computing | 626.6 |
| Technical Services/Scientific Support | 211 |
| Fisheries Research | 6446.6 |
| Fresh & Anadromous | 1175.4 |
| Groundfish | 2268.2 |
| Invertebrates | 821.9 |
| Marine Mammals | 450.1 |
| Pelagic Fish | 1151.9 |
| Fisheries Ecology | 579.1 |
| Aquaculture and Resource Dev. | 1050.1 |
| Microbial Chemistry | 223.7 |
| Resource Development | 826.4 |
| Habitat Assessment & Rel. Res. | 1015.6 |
| Habitat Management/Assessment | 200.3 |
| Habitat Research | 241.4 |
| Acid Rain | 414.4 |
| Freshwater Ecosystems | 159.5 |
| Regional Library | 204 |
| Ships, Charter | 5519.8 |
| Ships | 1867.2 |
| Science Branch (TOTAL) | 17257 |
Copy link to clipboard
Copied
In the scriptographer example, I couldn't effect changes on the chart via the 'Read Settings' tab. A bit confused on that one-once the chart is generated, it cannot be changed?
Ehm. I don't have Scriptographer installed here (at work), but it ought to work like this:
1. You generate a graph, using the text field with data.
2. You use the Scriptographer palette to adjust rotation & distances.
3. You do something else.
4. If you want to adjust an existing graph (i.e., aforementioned rotation and/or distance), start the script again. Select the graph, and press the "Read settings" button to 'read' the settings that were applied in that graph into the Scripto palette -- otherwise it'd reset the graph to the last settings that were active in the palette.
It should work ... (But note, if you 'adjust' a graph using this method, it gets destroyed and built entirely from scratch.)
How should I rearrange this data to fit the scripts?
I left the multi-tabbed idea for another rainy day -- implementing that would need a much smarter script that creates multi-level circles ... But you can cut up your data into separate text frames, one frame for each set of 'title / data' lines. You should probably end up with something like this for the Root circle (the largest):
| Science Branch (TOTAL) | |
| Fisheries Research Administration | 1153.7 |
| Fisheries Research | 6446.6 |
| Aquaculture and Resource Dev. | 1050.1 |
| Habitat Assessment & Rel. Res. | 1015.6 |
| Regional Library | 204 |
| Ships, Charter | 5519.8 |
| Ships | 1867.2 |
-- where "Science Branch" doesn't need a number (everything below adds up correctly) and will appear as "title" in the largest circle. Do the same for the other categories, so you end up with 7 text frames with associated data, and this graph, plus the 7 smaller ones. Then move them around until you like what you see.
I would suggest that if you have everything arranged, you save & close that file and continue working on a copy to add the artistic touches. That way, you can ungroup all items, so you can finally change the background color from that ghastly default blue ![]()
Copy link to clipboard
Copied
My view of how this can really come together is starting to clear-
A. rearrange each datagroup to properly read through the script at each tier.
B. Generate a starting chart w/Science Branch center
C. Generate subordinate charts for each of the Science Branch's subordinate expenses.
D.--little more than a drag&drop to rearrange? This is a sticky part-how can I ensure I preserve the correct relative sizes of each circle?
E. Graphic/text editing
I'll have to try it now and check back.
Edit:
Hrm...I can generate single tier charts, most of them (some odd exclusions, not sure why), but the Krazycircles script crashes illustrator at inconsistent intervals. Anyhow, it appears that I can maintain the appropriate relative sizes by transform-scaling a given chart tier and overlapping that parent over it's coordinating child in the next-up chart. Once done then there is a fair bit of rearranging to do, but the circle sizes themselves are maintained.
Is there a way, if I used px dimensions instead of the $ amounts, to generate the charts with the appropriate scale from the start?
Copy link to clipboard
Copied
Is there a way, if I used px dimensions instead of the $ amounts, to generate the charts with the appropriate scale from the start?
It should still be possible, using both original KrazyCircles and the Scriptographer version, to select a 'root' circle first -- any single circle will do. Its area will be the basis for the relatively scaled down circles. Holler if it don't work annymore ...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now