Jump to content
Software FX Community
Sign in to follow this  
User (Legacy)

Problems with maps

Recommended Posts

We've tried to run the jsp samples within a stand-alone java 

application, but obviously it doesn't work.

The resulting image (png) seems to be distorted. Trying the USA-examples

results in a distorted picture containing states which are "not in

place" (meaning there are grey spaces between the states)

We are using the same data files, label link files and the svg as in the

jsp. The code is the same, except that we use map.exportChart(...) to

save the output file.

This is the code we are using:

<--snip-->

import SoftwareFX.ChartFX.ClearDataFlag;

import SoftwareFX.ChartFX.FileFormat;

import SoftwareFX.ChartFX.TextProvider;

import SoftwareFX.ChartFX.Map.Map;

public class Test {

public static void main(String[] args)

{

Map map = new Map();

map.clearData(ClearDataFlag.LABELS);

map.setMapSource("r:\\USA-StatesAbrev.svg");

map.setDataSource(new

TextProvider("r:\\US_results.txt"));

map.setLabelLinkFile("r:\\US_LabelLinks.xml");

map.setDataEditor(true);

map.setUserLegendBox(true);

map.getSeries().getItem(0).setColor(java.awt.Color.blue);

map.getSeries().getItem(1).setColor(java.awt.Color.red);

try {

map.exportChart(FileFormat.PNG,"r:\\map.png");

} catch (IOException e) {

e.printStackTrace();

}

}

}

</--snip-->

Any help appreciated,

regards,

Karl Kreiner

Share this post


Link to post
Share on other sites

Hi Karl,  I'm running this code and I'm getting a map tha looks ok, the png 

is attached. Can you post the image you are getting?

Can you give me more info about your system please? OS, Java version, etc.

so I can try to replicate the issue.

Thanks,

GA

SoftwareFX

"Karl Kreiner" <kreiner@telbiomed.at> wrote in message

news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

> We've tried to run the jsp samples within a stand-alone java

> application, but obviously it doesn't work.

> The resulting image (png) seems to be distorted. Trying the USA-examples

> results in a distorted picture containing states which are "not in

> place" (meaning there are grey spaces between the states)

>

> We are using the same data files, label link files and the svg as in the

> jsp. The code is the same, except that we use map.exportChart(...) to

> save the output file.

>

> This is the code we are using:

>

> <--snip-->

> import SoftwareFX.ChartFX.ClearDataFlag;

> import SoftwareFX.ChartFX.FileFormat;

> import SoftwareFX.ChartFX.TextProvider;

> import SoftwareFX.ChartFX.Map.Map;

>

> public class Test {

>

> public static void main(String[] args)

> {

> Map map = new Map();

>

> map.clearData(ClearDataFlag.LABELS);

> map.setMapSource("r:\\USA-StatesAbrev.svg");

> map.setDataSource(new

> TextProvider("r:\\US_results.txt"));

> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

> map.setDataEditor(true);

> map.setUserLegendBox(true);

>

>

> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

> map.getSeries().getItem(1).setColor(java.awt.Color.red);

> try {

> map.exportChart(FileFormat.PNG,"r:\\map.png");

> } catch (IOException e) {

> e.printStackTrace();

> }

> }

>

> }

> </--snip-->

>

> Any help appreciated,

>

> regards,

> Karl Kreiner

>

>

>

Share this post


Link to post
Share on other sites

Hi,

we are using Chart FX for Java Community Edition 6.2. We have tested the

code using Java 5.0 on Windows XP. I've attached the resulting output.

regards,

Karl Kreiner

"SoftwareFX Support" <noreply> schrieb im Newsbeitrag

news:dmyH5YiYGHA.1540@webserver3.softwarefx.com...

> Hi Karl, I'm running this code and I'm getting a map tha looks ok, the

> png

> is attached. Can you post the image you are getting?

>

> Can you give me more info about your system please? OS, Java version,

> etc.

> so I can try to replicate the issue.

>

> Thanks,

> GA

> SoftwareFX

>

>

>

> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

> news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

>> We've tried to run the jsp samples within a stand-alone java

>> application, but obviously it doesn't work.

>> The resulting image (png) seems to be distorted. Trying the USA-examples

>> results in a distorted picture containing states which are "not in

>> place" (meaning there are grey spaces between the states)

>>

>> We are using the same data files, label link files and the svg as in the

>> jsp. The code is the same, except that we use map.exportChart(...) to

>> save the output file.

>>

>> This is the code we are using:

>>

>> <--snip-->

>> import SoftwareFX.ChartFX.ClearDataFlag;

>> import SoftwareFX.ChartFX.FileFormat;

>> import SoftwareFX.ChartFX.TextProvider;

>> import SoftwareFX.ChartFX.Map.Map;

>>

>> public class Test {

>>

>> public static void main(String[] args)

>> {

>> Map map = new Map();

>>

>> map.clearData(ClearDataFlag.LABELS);

>> map.setMapSource("r:\\USA-StatesAbrev.svg");

>> map.setDataSource(new

>> TextProvider("r:\\US_results.txt"));

>> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

>> map.setDataEditor(true);

>> map.setUserLegendBox(true);

>>

>>

>> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

>> map.getSeries().getItem(1).setColor(java.awt.Color.red);

>> try {

>> map.exportChart(FileFormat.PNG,"r:\\map.png");

>> } catch (IOException e) {

>> e.printStackTrace();

>> }

>> }

>>

>> }

>> </--snip-->

>>

>> Any help appreciated,

>>

>> regards,

>> Karl Kreiner

>>

>>

>>

>

>

>

post-2106-13922364443789_thumb.png

Share this post


Link to post
Share on other sites

Hi Karl, we have been trying to reproduce this issue with no sucess. I need 

some more information from you:

- Which version are you running? to get the version type "java -jar

chartfx.jar -version" in a command prompt.

- Do you get the same kind of behaviour if you run the JSP sample?

- Are you using "large fonts" or have you changed the dpi setting fot your

display?

- Finally, please export the map in binary format and post the file, to do

this add the following code:

map.exportChart(FileFormat.BINARY, "r:\\map.bin");

Thanks,

GA

"Karl Kreiner" <kreiner@telbiomed.at> wrote in message

news:OQQHQosYGHA.1540@webserver3.softwarefx.com...

> Hi,

>

> we are using Chart FX for Java Community Edition 6.2. We have tested the

> code using Java 5.0 on Windows XP. I've attached the resulting output.

>

> regards,

> Karl Kreiner

>

> "SoftwareFX Support" <noreply> schrieb im Newsbeitrag

> news:dmyH5YiYGHA.1540@webserver3.softwarefx.com...

>> Hi Karl, I'm running this code and I'm getting a map tha looks ok, the

>> png

>> is attached. Can you post the image you are getting?

>>

>> Can you give me more info about your system please? OS, Java version,

>> etc.

>> so I can try to replicate the issue.

>>

>> Thanks,

>> GA

>> SoftwareFX

>>

>>

>>

>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>> news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

>>> We've tried to run the jsp samples within a stand-alone java

>>> application, but obviously it doesn't work.

>>> The resulting image (png) seems to be distorted. Trying the USA-examples

>>> results in a distorted picture containing states which are "not in

>>> place" (meaning there are grey spaces between the states)

>>>

>>> We are using the same data files, label link files and the svg as in the

>>> jsp. The code is the same, except that we use map.exportChart(...) to

>>> save the output file.

>>>

>>> This is the code we are using:

>>>

>>> <--snip-->

>>> import SoftwareFX.ChartFX.ClearDataFlag;

>>> import SoftwareFX.ChartFX.FileFormat;

>>> import SoftwareFX.ChartFX.TextProvider;

>>> import SoftwareFX.ChartFX.Map.Map;

>>>

>>> public class Test {

>>>

>>> public static void main(String[] args)

>>> {

>>> Map map = new Map();

>>>

>>> map.clearData(ClearDataFlag.LABELS);

>>> map.setMapSource("r:\\USA-StatesAbrev.svg");

>>> map.setDataSource(new

>>> TextProvider("r:\\US_results.txt"));

>>> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

>>> map.setDataEditor(true);

>>> map.setUserLegendBox(true);

>>>

>>>

>>> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

>>> map.getSeries().getItem(1).setColor(java.awt.Color.red);

>>> try {

>>> map.exportChart(FileFormat.PNG,"r:\\map.png");

>>> } catch (IOException e) {

>>> e.printStackTrace();

>>> }

>>> }

>>>

>>> }

>>> </--snip-->

>>>

>>> Any help appreciated,

>>>

>>> regards,

>>> Karl Kreiner

>>>

>>>

>>>

>>

>>

>>

>

>

>

post-2107-13922364572302_thumb.png

Share this post


Link to post
Share on other sites

I'm running 1.5.0_05.  I'll try with 04 to see if I can reproduce it. We 

will take a look at the binaries and get back to you.

Thanks,

GA

"DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

news:QtNT343YGHA.3992@webserver3.softwarefx.com...

> Hi,

>

> I've been investigating this issue as well and it seems that the Java

> runtime is

> crucial. I've tested a simple SVG import and JPG/PNG export (please find

> the

> code attached at the bottom) without adjusting any settings and I'm

> getting the

> distorted chart using Java 1.5.0_04. If I switch back to JRE 1.4.2_08 the

> generated image looks fine. We are using version 6.2.2266.27659 of

> chartfx.jar

> under Windows XP.

> Please find also attached an exported map for each Java runtime in the

> binary

> format.

> Unfortunately a majority of our code is JRE 1.5 compliant and therefore

> doing

> the downgrade is not favored.

> Any pointers?

>

> Thanks,

>

> Kurt

>

> <code>

> Map map = new Map();

>

> map.setMapSource("USA-StatesAbrev.svg");

> map.setDataSource(new TextProvider("US_results.txt"));

> map.setLabelLinkFile("US_LabelLinks.xml");

> try {

> map.exportChart(FileFormat.JPEG,"output_1_5_0_04.jpg");

> map.exportChart(FileFormat.BINARY, "map_1_5_0_04.bin");

> } catch (IOException e) {

> e.printStackTrace();

> }

> </code>

>

> on 18.04.2006 23:45 SoftwareFX Support stated:

>> Hi Karl, we have been trying to reproduce this issue with no sucess. I

>> need

>> some more information from you:

>> - Which version are you running? to get the version type "java -jar

>> chartfx.jar -version" in a command prompt.

>> - Do you get the same kind of behaviour if you run the JSP sample?

>> - Are you using "large fonts" or have you changed the dpi setting fot

>> your

>> display?

>> - Finally, please export the map in binary format and post the file, to

>> do

>> this add the following code:

>>

>> map.exportChart(FileFormat.BINARY, "r:\\map.bin");

>>

>> Thanks,

>> GA

>>

>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>> news:OQQHQosYGHA.1540@webserver3.softwarefx.com...

>>> Hi,

>>>

>>> we are using Chart FX for Java Community Edition 6.2. We have tested

>>> the

>>> code using Java 5.0 on Windows XP. I've attached the resulting output.

>>>

>>> regards,

>>> Karl Kreiner

>>>

>>> "SoftwareFX Support" <noreply> schrieb im Newsbeitrag

>>> news:dmyH5YiYGHA.1540@webserver3.softwarefx.com...

>>>> Hi Karl, I'm running this code and I'm getting a map tha looks ok, the

>>>> png

>>>> is attached. Can you post the image you are getting?

>>>>

>>>> Can you give me more info about your system please? OS, Java version,

>>>> etc.

>>>> so I can try to replicate the issue.

>>>>

>>>> Thanks,

>>>> GA

>>>> SoftwareFX

>>>>

>>>>

>>>>

>>>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>>>> news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

>>>>> We've tried to run the jsp samples within a stand-alone java

>>>>> application, but obviously it doesn't work.

>>>>> The resulting image (png) seems to be distorted. Trying the

>>>>> USA-examples

>>>>> results in a distorted picture containing states which are "not in

>>>>> place" (meaning there are grey spaces between the states)

>>>>>

>>>>> We are using the same data files, label link files and the svg as in

>>>>> the

>>>>> jsp. The code is the same, except that we use map.exportChart(...) to

>>>>> save the output file.

>>>>>

>>>>> This is the code we are using:

>>>>>

>>>>> <--snip-->

>>>>> import SoftwareFX.ChartFX.ClearDataFlag;

>>>>> import SoftwareFX.ChartFX.FileFormat;

>>>>> import SoftwareFX.ChartFX.TextProvider;

>>>>> import SoftwareFX.ChartFX.Map.Map;

>>>>>

>>>>> public class Test {

>>>>>

>>>>> public static void main(String[] args)

>>>>> {

>>>>> Map map = new Map();

>>>>>

>>>>> map.clearData(ClearDataFlag.LABELS);

>>>>> map.setMapSource("r:\\USA-StatesAbrev.svg");

>>>>> map.setDataSource(new

>>>>> TextProvider("r:\\US_results.txt"));

>>>>> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

>>>>> map.setDataEditor(true);

>>>>> map.setUserLegendBox(true);

>>>>>

>>>>>

>>>>> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

>>>>>

>>>>> map.getSeries().getItem(1).setColor(java.awt.Color.red);

>>>>> try {

>>>>> map.exportChart(FileFormat.PNG,"r:\\map.png");

>>>>> } catch (IOException e) {

>>>>> e.printStackTrace();

>>>>> }

>>>>> }

>>>>>

>>>>> }

>>>>> </--snip-->

>>>>>

>>>>> Any help appreciated,

>>>>>

>>>>> regards,

>>>>> Karl Kreiner

>>>>>

>>>>>

>>>>>

>>>>

>>>>

>>>

>>>

>>

>>

>

>

Share this post


Link to post
Share on other sites

I have run your original code with 1.5.0_04 and still can get disorted map.

GA

SoftwareFX

"DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

news:QtNT343YGHA.3992@webserver3.softwarefx.com...

> Hi,

>

> I've been investigating this issue as well and it seems that the Java

> runtime is

> crucial. I've tested a simple SVG import and JPG/PNG export (please find

> the

> code attached at the bottom) without adjusting any settings and I'm

> getting the

> distorted chart using Java 1.5.0_04. If I switch back to JRE 1.4.2_08 the

> generated image looks fine. We are using version 6.2.2266.27659 of

> chartfx.jar

> under Windows XP.

> Please find also attached an exported map for each Java runtime in the

> binary

> format.

> Unfortunately a majority of our code is JRE 1.5 compliant and therefore

> doing

> the downgrade is not favored.

> Any pointers?

>

> Thanks,

>

> Kurt

>

> <code>

> Map map = new Map();

>

> map.setMapSource("USA-StatesAbrev.svg");

> map.setDataSource(new TextProvider("US_results.txt"));

> map.setLabelLinkFile("US_LabelLinks.xml");

> try {

> map.exportChart(FileFormat.JPEG,"output_1_5_0_04.jpg");

> map.exportChart(FileFormat.BINARY, "map_1_5_0_04.bin");

> } catch (IOException e) {

> e.printStackTrace();

> }

> </code>

>

> on 18.04.2006 23:45 SoftwareFX Support stated:

>> Hi Karl, we have been trying to reproduce this issue with no sucess. I

>> need

>> some more information from you:

>> - Which version are you running? to get the version type "java -jar

>> chartfx.jar -version" in a command prompt.

>> - Do you get the same kind of behaviour if you run the JSP sample?

>> - Are you using "large fonts" or have you changed the dpi setting fot

>> your

>> display?

>> - Finally, please export the map in binary format and post the file, to

>> do

>> this add the following code:

>>

>> map.exportChart(FileFormat.BINARY, "r:\\map.bin");

>>

>> Thanks,

>> GA

>>

>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>> news:OQQHQosYGHA.1540@webserver3.softwarefx.com...

>>> Hi,

>>>

>>> we are using Chart FX for Java Community Edition 6.2. We have tested

>>> the

>>> code using Java 5.0 on Windows XP. I've attached the resulting output.

>>>

>>> regards,

>>> Karl Kreiner

>>>

>>> "SoftwareFX Support" <noreply> schrieb im Newsbeitrag

>>> news:dmyH5YiYGHA.1540@webserver3.softwarefx.com...

>>>> Hi Karl, I'm running this code and I'm getting a map tha looks ok, the

>>>> png

>>>> is attached. Can you post the image you are getting?

>>>>

>>>> Can you give me more info about your system please? OS, Java version,

>>>> etc.

>>>> so I can try to replicate the issue.

>>>>

>>>> Thanks,

>>>> GA

>>>> SoftwareFX

>>>>

>>>>

>>>>

>>>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>>>> news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

>>>>> We've tried to run the jsp samples within a stand-alone java

>>>>> application, but obviously it doesn't work.

>>>>> The resulting image (png) seems to be distorted. Trying the

>>>>> USA-examples

>>>>> results in a distorted picture containing states which are "not in

>>>>> place" (meaning there are grey spaces between the states)

>>>>>

>>>>> We are using the same data files, label link files and the svg as in

>>>>> the

>>>>> jsp. The code is the same, except that we use map.exportChart(...) to

>>>>> save the output file.

>>>>>

>>>>> This is the code we are using:

>>>>>

>>>>> <--snip-->

>>>>> import SoftwareFX.ChartFX.ClearDataFlag;

>>>>> import SoftwareFX.ChartFX.FileFormat;

>>>>> import SoftwareFX.ChartFX.TextProvider;

>>>>> import SoftwareFX.ChartFX.Map.Map;

>>>>>

>>>>> public class Test {

>>>>>

>>>>> public static void main(String[] args)

>>>>> {

>>>>> Map map = new Map();

>>>>>

>>>>> map.clearData(ClearDataFlag.LABELS);

>>>>> map.setMapSource("r:\\USA-StatesAbrev.svg");

>>>>> map.setDataSource(new

>>>>> TextProvider("r:\\US_results.txt"));

>>>>> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

>>>>> map.setDataEditor(true);

>>>>> map.setUserLegendBox(true);

>>>>>

>>>>>

>>>>> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

>>>>>

>>>>> map.getSeries().getItem(1).setColor(java.awt.Color.red);

>>>>> try {

>>>>> map.exportChart(FileFormat.PNG,"r:\\map.png");

>>>>> } catch (IOException e) {

>>>>> e.printStackTrace();

>>>>> }

>>>>> }

>>>>>

>>>>> }

>>>>> </--snip-->

>>>>>

>>>>> Any help appreciated,

>>>>>

>>>>> regards,

>>>>> Karl Kreiner

>>>>>

>>>>>

>>>>>

>>>>

>>>>

>>>

>>>

>>

>>

>

>

Share this post


Link to post
Share on other sites

on 19.04.2006 15:49 SoftwareFX Support stated:

> I have run your original code with 1.5.0_04 and still can get disorted map.

I'm not too happy to hear that fact. Is there anything else we could try? Are we

using the same version of chartfx.jar (6.2.2266.27659) than you do?

The distorted map is created by simply importing the svg file and exporting to a

PNG file. Any ideas how to proceed?

Regards, Kurt

>

> GA

> SoftwareFX

>

> "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

> news:QtNT343YGHA.3992@webserver3.softwarefx.com...

>> Hi,

>>

>> I've been investigating this issue as well and it seems that the Java

>> runtime is

>> crucial. I've tested a simple SVG import and JPG/PNG export (please find

>> the

>> code attached at the bottom) without adjusting any settings and I'm

>> getting the

>> distorted chart using Java 1.5.0_04. If I switch back to JRE 1.4.2_08 the

>> generated image looks fine. We are using version 6.2.2266.27659 of

>> chartfx.jar

>> under Windows XP.

>> Please find also attached an exported map for each Java runtime in the

>> binary

>> format.

>> Unfortunately a majority of our code is JRE 1.5 compliant and therefore

>> doing

>> the downgrade is not favored.

>> Any pointers?

>>

>> Thanks,

>>

>> Kurt

>>

>> <code>

>> Map map = new Map();

>>

>> map.setMapSource("USA-StatesAbrev.svg");

>> map.setDataSource(new TextProvider("US_results.txt"));

>> map.setLabelLinkFile("US_LabelLinks.xml");

>> try {

>> map.exportChart(FileFormat.JPEG,"output_1_5_0_04.jpg");

>> map.exportChart(FileFormat.BINARY, "map_1_5_0_04.bin");

>> } catch (IOException e) {

>> e.printStackTrace();

>> }

>> </code>

>>

>> on 18.04.2006 23:45 SoftwareFX Support stated:

>>> Hi Karl, we have been trying to reproduce this issue with no sucess. I

>>> need

>>> some more information from you:

>>> - Which version are you running? to get the version type "java -jar

>>> chartfx.jar -version" in a command prompt.

>>> - Do you get the same kind of behaviour if you run the JSP sample?

>>> - Are you using "large fonts" or have you changed the dpi setting fot

>>> your

>>> display?

>>> - Finally, please export the map in binary format and post the file, to

>>> do

>>> this add the following code:

>>>

>>> map.exportChart(FileFormat.BINARY, "r:\\map.bin");

>>>

>>> Thanks,

>>> GA

>>>

>>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>>> news:OQQHQosYGHA.1540@webserver3.softwarefx.com...

>>>> Hi,

>>>>

>>>> we are using Chart FX for Java Community Edition 6.2. We have tested

>>>> the

>>>> code using Java 5.0 on Windows XP. I've attached the resulting output.

>>>>

>>>> regards,

>>>> Karl Kreiner

>>>>

>>>> "SoftwareFX Support" <noreply> schrieb im Newsbeitrag

>>>> news:dmyH5YiYGHA.1540@webserver3.softwarefx.com...

>>>>> Hi Karl, I'm running this code and I'm getting a map tha looks ok, the

>>>>> png

>>>>> is attached. Can you post the image you are getting?

>>>>>

>>>>> Can you give me more info about your system please? OS, Java version,

>>>>> etc.

>>>>> so I can try to replicate the issue.

>>>>>

>>>>> Thanks,

>>>>> GA

>>>>> SoftwareFX

>>>>>

>>>>>

>>>>>

>>>>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>>>>> news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

>>>>>> We've tried to run the jsp samples within a stand-alone java

>>>>>> application, but obviously it doesn't work.

>>>>>> The resulting image (png) seems to be distorted. Trying the

>>>>>> USA-examples

>>>>>> results in a distorted picture containing states which are "not in

>>>>>> place" (meaning there are grey spaces between the states)

>>>>>>

>>>>>> We are using the same data files, label link files and the svg as in

>>>>>> the

>>>>>> jsp. The code is the same, except that we use map.exportChart(...) to

>>>>>> save the output file.

>>>>>>

>>>>>> This is the code we are using:

>>>>>>

>>>>>> <--snip-->

>>>>>> import SoftwareFX.ChartFX.ClearDataFlag;

>>>>>> import SoftwareFX.ChartFX.FileFormat;

>>>>>> import SoftwareFX.ChartFX.TextProvider;

>>>>>> import SoftwareFX.ChartFX.Map.Map;

>>>>>>

>>>>>> public class Test {

>>>>>>

>>>>>> public static void main(String[] args)

>>>>>> {

>>>>>> Map map = new Map();

>>>>>>

>>>>>> map.clearData(ClearDataFlag.LABELS);

>>>>>> map.setMapSource("r:\\USA-StatesAbrev.svg");

>>>>>> map.setDataSource(new

>>>>>> TextProvider("r:\\US_results.txt"));

>>>>>> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

>>>>>> map.setDataEditor(true);

>>>>>> map.setUserLegendBox(true);

>>>>>>

>>>>>>

>>>>>> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

>>>>>>

>>>>>> map.getSeries().getItem(1).setColor(java.awt.Color.red);

>>>>>> try {

>>>>>> map.exportChart(FileFormat.PNG,"r:\\map.png");

>>>>>> } catch (IOException e) {

>>>>>> e.printStackTrace();

>>>>>> }

>>>>>> }

>>>>>>

>>>>>> }

>>>>>> </--snip-->

>>>>>>

>>>>>> Any help appreciated,

>>>>>>

>>>>>> regards,

>>>>>> Karl Kreiner

>>>>>>

>>>>>>

>>>>>>

>>>>>

>>>>

>>>

>>

>

>

post-2106-1392236457689_thumb.png

Share this post


Link to post
Share on other sites

Yes you are using the same version.  There is something different in our 

environments and I don't know what it is. I have tested it in Windows XP

and Linux as well, with several version of Java, and I can not reproduce it.

But I was able to reproduce it by importing your binary, so I'll get a

developer to debug the binary file and he may be able to identify what is

going on.

In the meantime, can you please add the following lines to your program, and

let me know what is the value you get?

int resolution = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();

System.out.println("resolution: " + resolution);

Thanks,

GA

"DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

news:E9foBg8YGHA.3992@webserver3.softwarefx.com...

> on 19.04.2006 15:49 SoftwareFX Support stated:

>> I have run your original code with 1.5.0_04 and still can get disorted

>> map.

>

> I'm not too happy to hear that fact. Is there anything else we could try?

> Are we using the same version of chartfx.jar (6.2.2266.27659) than you do?

> The distorted map is created by simply importing the svg file and

> exporting to a PNG file. Any ideas how to proceed?

>

> Regards, Kurt

>

>>

>> GA

>> SoftwareFX

>>

>> "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

>> news:QtNT343YGHA.3992@webserver3.softwarefx.com...

>>> Hi,

>>>

>>> I've been investigating this issue as well and it seems that the Java

>>> runtime is

>>> crucial. I've tested a simple SVG import and JPG/PNG export (please find

>>> the

>>> code attached at the bottom) without adjusting any settings and I'm

>>> getting the

>>> distorted chart using Java 1.5.0_04. If I switch back to JRE 1.4.2_08

>>> the

>>> generated image looks fine. We are using version 6.2.2266.27659 of

>>> chartfx.jar

>>> under Windows XP.

>>> Please find also attached an exported map for each Java runtime in the

>>> binary

>>> format.

>>> Unfortunately a majority of our code is JRE 1.5 compliant and therefore

>>> doing

>>> the downgrade is not favored.

>>> Any pointers?

>>>

>>> Thanks,

>>>

>>> Kurt

>>>

>>> <code>

>>> Map map = new Map();

>>>

>>> map.setMapSource("USA-StatesAbrev.svg");

>>> map.setDataSource(new TextProvider("US_results.txt"));

>>> map.setLabelLinkFile("US_LabelLinks.xml");

>>> try {

>>> map.exportChart(FileFormat.JPEG,"output_1_5_0_04.jpg");

>>> map.exportChart(FileFormat.BINARY, "map_1_5_0_04.bin");

>>> } catch (IOException e) {

>>> e.printStackTrace();

>>> }

>>> </code>

>>>

>>> on 18.04.2006 23:45 SoftwareFX Support stated:

>>>> Hi Karl, we have been trying to reproduce this issue with no sucess. I

>>>> need

>>>> some more information from you:

>>>> - Which version are you running? to get the version type "java -jar

>>>> chartfx.jar -version" in a command prompt.

>>>> - Do you get the same kind of behaviour if you run the JSP sample?

>>>> - Are you using "large fonts" or have you changed the dpi setting fot

>>>> your

>>>> display?

>>>> - Finally, please export the map in binary format and post the file, to

>>>> do

>>>> this add the following code:

>>>>

>>>> map.exportChart(FileFormat.BINARY, "r:\\map.bin");

>>>>

>>>> Thanks,

>>>> GA

>>>>

>>>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>>>> news:OQQHQosYGHA.1540@webserver3.softwarefx.com...

>>>>> Hi,

>>>>>

>>>>> we are using Chart FX for Java Community Edition 6.2. We have tested

>>>>> the

>>>>> code using Java 5.0 on Windows XP. I've attached the resulting output.

>>>>>

>>>>> regards,

>>>>> Karl Kreiner

>>>>>

>>>>> "SoftwareFX Support" <noreply> schrieb im Newsbeitrag

>>>>> news:dmyH5YiYGHA.1540@webserver3.softwarefx.com...

>>>>>> Hi Karl, I'm running this code and I'm getting a map tha looks ok,

>>>>>> the

>>>>>> png

>>>>>> is attached. Can you post the image you are getting?

>>>>>>

>>>>>> Can you give me more info about your system please? OS, Java

>>>>>> version,

>>>>>> etc.

>>>>>> so I can try to replicate the issue.

>>>>>>

>>>>>> Thanks,

>>>>>> GA

>>>>>> SoftwareFX

>>>>>>

>>>>>>

>>>>>>

>>>>>> "Karl Kreiner" <kreiner@telbiomed.at> wrote in message

>>>>>> news:cYpV81wXGHA.1540@webserver3.softwarefx.com...

>>>>>>> We've tried to run the jsp samples within a stand-alone java

>>>>>>> application, but obviously it doesn't work.

>>>>>>> The resulting image (png) seems to be distorted. Trying the

>>>>>>> USA-examples

>>>>>>> results in a distorted picture containing states which are "not in

>>>>>>> place" (meaning there are grey spaces between the states)

>>>>>>>

>>>>>>> We are using the same data files, label link files and the svg as in

>>>>>>> the

>>>>>>> jsp. The code is the same, except that we use map.exportChart(...)

>>>>>>> to

>>>>>>> save the output file.

>>>>>>>

>>>>>>> This is the code we are using:

>>>>>>>

>>>>>>> <--snip-->

>>>>>>> import SoftwareFX.ChartFX.ClearDataFlag;

>>>>>>> import SoftwareFX.ChartFX.FileFormat;

>>>>>>> import SoftwareFX.ChartFX.TextProvider;

>>>>>>> import SoftwareFX.ChartFX.Map.Map;

>>>>>>>

>>>>>>> public class Test {

>>>>>>>

>>>>>>> public static void main(String[] args)

>>>>>>> {

>>>>>>> Map map = new Map();

>>>>>>>

>>>>>>> map.clearData(ClearDataFlag.LABELS);

>>>>>>> map.setMapSource("r:\\USA-StatesAbrev.svg");

>>>>>>> map.setDataSource(new

>>>>>>> TextProvider("r:\\US_results.txt"));

>>>>>>> map.setLabelLinkFile("r:\\US_LabelLinks.xml");

>>>>>>> map.setDataEditor(true);

>>>>>>> map.setUserLegendBox(true);

>>>>>>>

>>>>>>>

>>>>>>> map.getSeries().getItem(0).setColor(java.awt.Color.blue);

>>>>>>>

>>>>>>> map.getSeries().getItem(1).setColor(java.awt.Color.red);

>>>>>>> try {

>>>>>>>

>>>>>>> map.exportChart(FileFormat.PNG,"r:\\map.png");

>>>>>>> } catch (IOException e) {

>>>>>>> e.printStackTrace();

>>>>>>> }

>>>>>>> }

>>>>>>>

>>>>>>> }

>>>>>>> </--snip-->

>>>>>>>

>>>>>>> Any help appreciated,

>>>>>>>

>>>>>>> regards,

>>>>>>> Karl Kreiner

>>>>>>>

>>>>>>>

>>>>>>>

>>>>>>

>>>>>

>>>>

>>>

>>

Share this post


Link to post
Share on other sites

Hi,

thank you for your help, but we are still getting the distorted maps. I've

checked the screen resolution (with both versions of the JVM) and it is the

default of 96dpi.

Regards, Kurt

on 19.04.2006 19:51 SoftwareFX Support stated:

> <..snip..>

> In the meantime, can you please add the following lines to your program, and

> let me know what is the value you get?

>

> int resolution = java.awt.Toolkit.getDefaultToolkit().getScreenResolution();

> System.out.println("resolution: " + resolution);

>

> Thanks,

> GA

>

>

Share this post


Link to post
Share on other sites

I'm happy to report that we have been able to reproduce the issue and 

identify the bug. It is related to the Locale, and a bug report have been

submitted. It'll be fix and included in a future service pack.

A work around has been identified as well. Temporary setting the Locale to

English when creating the map object will produce a well formed map image.

Example:

java.util.Locale locale = java.util.Locale.getDefault();

java.util.Locale.setDefault(java.util.Locale.ENGLISH);

Map map = new Map();

java.util.Locale.setDefault(locale);

Thank you very much for the help in identifying and troubleshooting the

issue, I'll let you know when a service pack containing this fix is

released.

Regards,

GA

Software FX.

"DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

news:mOxODVFZGHA.3992@webserver3.softwarefx.com...

> Hi,

>

> thank you for your help, but we are still getting the distorted maps. I've

> checked the screen resolution (with both versions of the JVM) and it is

> the default of 96dpi.

>

> Regards, Kurt

>

> on 19.04.2006 19:51 SoftwareFX Support stated:

>> <..snip..> In the meantime, can you please add the following lines to

>> your program, and let me know what is the value you get?

>>

>> int resolution =

>> java.awt.Toolkit.getDefaultToolkit().getScreenResolution();

>> System.out.println("resolution: " + resolution);

>>

>> Thanks,

>> GA

>>

Share this post


Link to post
Share on other sites

Yes, it works. Thanks for your support,

regards,

Karl Kreiner

SoftwareFX Support schrieb:

> I'm happy to report that we have been able to reproduce the issue and

> identify the bug. It is related to the Locale, and a bug report have been

> submitted. It'll be fix and included in a future service pack.

>

> A work around has been identified as well. Temporary setting the Locale to

> English when creating the map object will produce a well formed map image.

> Example:

>

> java.util.Locale locale = java.util.Locale.getDefault();

> java.util.Locale.setDefault(java.util.Locale.ENGLISH);

> Map map = new Map();

> java.util.Locale.setDefault(locale);

>

> Thank you very much for the help in identifying and troubleshooting the

> issue, I'll let you know when a service pack containing this fix is

> released.

>

> Regards,

> GA

> Software FX.

>

>

> "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

> news:mOxODVFZGHA.3992@webserver3.softwarefx.com...

>> Hi,

>>

>> thank you for your help, but we are still getting the distorted maps. I've

>> checked the screen resolution (with both versions of the JVM) and it is

>> the default of 96dpi.

>>

>> Regards, Kurt

>>

>> on 19.04.2006 19:51 SoftwareFX Support stated:

>>> <..snip..> In the meantime, can you please add the following lines to

>>> your program, and let me know what is the value you get?

>>>

>>> int resolution =

>>> java.awt.Toolkit.getDefaultToolkit().getScreenResolution();

>>> System.out.println("resolution: " + resolution);

>>>

>>> Thanks,

>>> GA

>>>

>

Share this post


Link to post
Share on other sites

Glad to hear that.  We have a hotfix that fixes this issue. Hotfixes are 

version that have gone through the development testing cycle, but haven't

gone through the full release testing cycle yet. If you want the hot fix

please send an email to support@softwarefx.com with a subject "Chart FX for

Java Hotfix request". Anyway, the fix will be included in the next service

pack, to be released in a couple of weeks.

Regards,

GA

Software FX

"Karl Kreiner" <kreiner@telbiomed.at> wrote in message

news:ozRrqq3ZGHA.1540@webserver3.softwarefx.com...

> Yes, it works. Thanks for your support,

>

> regards,

> Karl Kreiner

>

> SoftwareFX Support schrieb:

>> I'm happy to report that we have been able to reproduce the issue and

>> identify the bug. It is related to the Locale, and a bug report have

>> been submitted. It'll be fix and included in a future service pack.

>>

>> A work around has been identified as well. Temporary setting the Locale

>> to English when creating the map object will produce a well formed map

>> image. Example:

>>

>> java.util.Locale locale = java.util.Locale.getDefault();

>> java.util.Locale.setDefault(java.util.Locale.ENGLISH);

>> Map map = new Map();

>> java.util.Locale.setDefault(locale);

>>

>> Thank you very much for the help in identifying and troubleshooting the

>> issue, I'll let you know when a service pack containing this fix is

>> released.

>>

>> Regards,

>> GA

>> Software FX.

>>

>>

>> "DI Kurt Edegger" <news_tmp1@edegger.com> wrote in message

>> news:mOxODVFZGHA.3992@webserver3.softwarefx.com...

>>> Hi,

>>>

>>> thank you for your help, but we are still getting the distorted maps.

>>> I've checked the screen resolution (with both versions of the JVM) and

>>> it is the default of 96dpi.

>>>

>>> Regards, Kurt

>>>

>>> on 19.04.2006 19:51 SoftwareFX Support stated:

>>>> <..snip..> In the meantime, can you please add the following lines to

>>>> your program, and let me know what is the value you get?

>>>>

>>>> int resolution =

>>>> java.awt.Toolkit.getDefaultToolkit().getScreenResolution();

>>>> System.out.println("resolution: " + resolution);

>>>>

>>>> Thanks,

>>>> GA

>>>>

>>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...