Data is incorrect after importing variable library into Illustrator

I have a bunch of graphs in an Illustrator document. All of them are tagged and have been exported to an XML document. I want to change the numbers in the XML and re-import it to update the graphs with new numbers. When I click ‘load variable library’, the graphs update like they should, but the numbers are incorrect. Everything gets rounded down: 3,195 becomes 3.00; 4,080 becomes 4.00; 11,568 becomes 11.00.

Has anyone had this experience before?

Answer

Apparently the problem arose because I had commas in the data that I was importing. Illustrator read those as decimals for some reason.

Originally, the data in my XML looked like this:

<graph1>
    <data  numDataColumns="9">
        <values>
            <row>
                <value  key="name"></value>
                <value>3,195</value> [when imported, became 3.00]
                <value>4,819</value> [became 4.00]
                <value>10,490</value> [became 10.00]
                <value>2,324</value> [became 2.00]
            </row>
        </values>
    </data>
</graph1>

Removing the comma solved the problem.

<graph1>
    <data  numDataColumns="9">
        <values>
            <row>
                <value  key="name"></value>
                <value>3195</value>
                <value>4819</value>
                <value>10490</value>
                <value>2324</value>
            </row>
        </values>
    </data>
</graph1>

Attribution
Source : Link , Question Author : ale19 , Answer Author : ale19

Leave a Comment