Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Some languages are not handled correctly by WaveFormGraph.

The Y-axis text of my WaveFormGraph appears to be inverting some non-English character sets.
 
In English, the characters are rotated 90 degrees counter clockwise, so they read correctly going from bottom to top.
See attached screen shot, "phasedeg_english_chinese.bmp"
 
It shows the string table with the phrase "Phase, Degrees", and how it is displayed.
 
The lower part of the screen shot shows the Chinese string characters (unicode), and how they are displayed.
They are fully inverted (180 degrees), and, where the width of the axis label allows, two of them are set side-by-side.
 
Question: what is the mechanism which rotates the characters, and how can I get the Chinese ones back to the 90 degree rotation?  Is there
a property for the axis which can be changed programatically?
 
0 Kudos
Message 1 of 8
(4,240 Views)

Hi Pete,

I am unsure of a way to change the orientation off the top of my head.  Also, I am unfamiliar with how to create Chinese charaters.  So, I was hoping you could send me a small example of your application or at least step by step instructions of how you set up your graph so that I could investigate this more.  Let me know if this sounds good.

 

Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 2 of 8
(4,223 Views)

Caroline,

Here is a small project, with two WaveFormGraphs showing an all-English Yaxis label on left and a combined Chinese-English Yaxis label, on right.  The strings are picked up from the string resource, SR.strings.

To run, you need the String Resource Tool, from Microsoft, installed.  Also, on the Regional Options, Simplified Chinese has to be installed.

You will see in the SR.strings file the two label strings.  Note that in the Chinese/English string, the Chinese characters are rotated 180deg, while the English characters rotate 90 degrees when set into the axis label.

Thanks.

Pete

0 Kudos
Message 3 of 8
(4,207 Views)

Project attachment

0 Kudos
Message 4 of 8
(4,207 Views)

Do the characters look ok if you display the axis and caption on the right side of the graph instead of the left? I can't read simplified chinese so I wanted to double check with you what you expected the characters to look like.

Thanks

Bilal Durrani
NI
0 Kudos
Message 5 of 8
(4,195 Views)
Bilal,
 
When written to the right side of the graph, the characters read top-to-bottom, which is fine for Chinese.  However, the desired annotation position is the left side, where the characters appear upside-down.
 
BTW, I'm just comparing the characters with the source strings to see this behavior.  A Chinese speaker, which I am not, flagged the orientation as incorrect.
 
Peter
0 Kudos
Message 6 of 8
(4,188 Views)

Hello

I have filed a bug report for this. The only workaround I can come up at this point would be to draw the caption string on the graph yourself on the Graph's OnPaint event. I have attached an example of this using MStudio 7.1. The graph on the right uses the custom drawn string, while the graph on the right uses the default implementation. Also, I changed the minimum width of the axis to 40 to provide some additional space. Depending on your application, you could switch implementations when you're changing the strings that are to be displayed on the UI. You would also make this graph into a user control and add the workaround in there.
The graph on the buttom shows the user control graph.

I hope this helps

Message Edited by bilalD on 09-09-2005 10:51 AM

Bilal Durrani
NI
0 Kudos
Message 7 of 8
(4,168 Views)

So... when i said right, i meant left 😛

The graph on the left uses the default implementation while the one of the right uses the string i drew myself on the axis.

Bilal Durrani
NI
0 Kudos
Message 8 of 8
(4,156 Views)