Graph Widgets

0
I want to display Graph title in multiple languages? Can we pass enumeration values to the widget to achieve the same? Any thougts how this can be done using widgets?
asked
2 answers
7

For instance you could change the simple charts widget to be translatable. For instance you could edit the SimpleChart.xml file and change the following lines:

<property key="xastitle" type="string" defaultValue="" required="false">
        <caption>X axis label</caption>
        <category>Chart X Axis</category>
        <description>Label of the X axis.</description>
    </property>

to:

<property key="xastitle" type="translatableString" required="false">
        <caption>X axis label</caption>
        <category>Chart X Axis</category>
        <description>Label of the X axis.</description>
    </property>

This will make the x axis title translatable.

Then you can put a different title for each language.

To get this file what you need to do is copy the SimpleCharts.mpk from the widgets folder to another location. Then you should rename SimpleCharts.mpk to SimpleCharts.zip. Extract the files, and the file you are looking for is in the SimpleCharts folder. If you want to add the widget back to the mendix system you need to zip all the files up again then rename the SimpleCharts.zip to SimpleCharts.mpk. Then place the mpk back into the widgets folder.

This documentation on structure and creation of widgets will also help: https://world.mendix.com/pages/releaseview.action?pageId=11439212

I hope this helps.

answered
0

You can adapt the widgets and change the type of the titles from 'String' to 'TranslatableString'

answered