show highcharts node text from beginning if the text is to long - highcharts

If the text in the highchart node is longer than the node only a part of the text is displayed. This is okay. But how can I show allways the beginning of the text?
I tried to set verticalAlign to top but this pushes only the displayed text to the top of the node and don't show a other part of the text.
It is the node with
title: Merkmale | Makro zur Prüfung
description: [MORE.OAI] Office AddIn(370/454,6)CR: OfficeAddin/DMS-AddIn für MS-Outlook, MS-Excel und MS-Word [OAI](/449,1)
It shows
(370/454,6)
CR: OfficeAddin/DMS-AddIn für MS-Outlook,
but it should show
Merkmale | Makro zur Prüfung
[MORE.OAI] Office AddIn
Example Code https://jsfiddle.net/omurx8Lk/4/

You can use the dataLabels.nodeFormat to control what data label should display. By default dataLabel displayed the description (has higher priority than name) or name.
Demo: https://jsfiddle.net/BlackLabel/r5hq2uds/
{
"id": "17698",
"name": "Merkmale | Makro zur Prüfung",
"color": "#AAAAAA",
"description": "[MORE.OAI] Office AddIn<br/>(370/454,6)<br/>CR: OfficeAddin/DMS-AddIn für MS-Outlook, MS-Excel und MS-Word [OAI]<br/>(/449,1)",
dataLabels: {
nodeFormat: '{point.name}'
}
},
API: https://api.highcharts.com/highcharts/plotOptions.organization.dataLabels.nodeFormat

Related

Part colour doesn't pull through from Configured Products

I have an issue that I have created 4 derived Products from a single part, that each part has a different Colour / Material set within it. I have the 4 Products called as PossibleChildren in my main part but when I try and bring in one of the 4 Products which ever is the first colour I pick, is the only colour that will select, so if for example I select RED for my first part, if I then pick the BLUE part it still only places the RED part. I created the 4 Products by importing this text...
"item_id","configuration"
"sub_s2_8t15","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:s2_8t15""}}"
"sub_s2_7t58","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:s2_7t58""}}"
"sub_s2_4t50","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:s2_4t50""}}"
"sub_twinwall","{""componentId"":""racksystems_test:sub_fronttile"",""parameters"":
{""tileColour"":""racksystems_test:twinwall""}}"
And then in the master.json part I call the 4 created Products...
"itemId": "racksystems_test:sub_s2_8t15",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
}, {
"itemId": "racksystems_test:sub_s2_7t58",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
}, {
"itemId": "racksystems_test:sub_s2_4t50",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
}, {
"itemId": "racksystems_test:sub_twinwall",
"condition":"((version=='Rack')&&(company=='BetaTest'))"
},
I have a KEY in the sub_fronttile.json as this..
{
"key": "tileColour",
"type": "Material",
"labels": {
"en": "Tile Colour?"
},
"defaultValue": "",
"valueObjects": [
{
"value": "racksystems_test:red",
"labels": {
"en": "Black"
}
},
........
Then call the colour in my geometry like this...
AddCube(Vector3f{infillWidth-20,materialThickness,infillHeight-20});
SetObjSurface(tileColour);
MoveMatrixBy(Vector3f{20,-offset,40});
So master.json is my main part and sub_fronttile.json contains my products
Is tileColour a global parameter? If yes, then the global value is assigned on dock. If tileCoulour is not a global parameter, this should not happen unless an assignmentOnDock is used.
In order to workaround the assignment in global parameters, it might help to:
have two parameters instead, tileColour_local, tileColour_global where one is global and not visible, other is not global and is visible.
tileColour_global.onValueChange: "if (parameter.userTriggeredChange) { tileColour_local = tileColour_global; }

With the Google Slides API is there a ways to know the height of the text in a shape?

I want to have a shape with text where the text fits neatly inside the shape. To do this I need to know how tall the text in a textElement will be inside a given shape, is there a way to do this?
Answer:
You can get the information of the font size of text inside a Shape using presentations.get with a field mask.
More Information:
The structure of a Shape with text is as follows (irrelevant fields omitted):
{
"shapeType": enum (Type),
"text": {
"textElements": [
{
"textRun": {
"style": {
"fontSize": {
"magnitude": 18,
"unit": "PT"
},
}
},
}
],
},
...
}
You can get this with the field mask:
slides/pageElements/shape/text/textElements/textRun/style/fontSize
Example Request:
slides.presentations.get({
"presentationId": "1x1iiFW0TbP3yPXRldYogXLEGT-tYfa79a2X8ZDIq8tU",
"fields": "slides/pageElements/shape/text/textElements/textRun/style/fontSize"
});
Note: The API does not return if the text wraps across multiple lines or not. This isn't retrievable due to the nature of font sizes. If the font you were using is a monospace font, it may however be possible to work this out based on the width of the Shape and the width of the characters contained within it.
References:
Text - Page.TextStyle | Slides API | Google Developers
Working with field masks | Slides API | Google Developers

Show data table from JSON in iPad app

I have a API which returns JSON:
{
"id": 1,
"name": "A green door",
"price": 12.50,
"tags": ["home", "green"]
}
{
"id": 2,
"name": "A blue door",
"price": 13.50,
"tags": ["work", "blue"]
}
In iPad app, I need to show this in the following data table format:
id name price tags
1 A green door 12.50 home, green
2 A blue door 13.50 work, blue
I have tried the following https://github.com/brightec/CustomCollectionViewLayout but it does not work.
How can it be done?
You can create a simple table view. I created a simple example with your data. Sorry, I don't have time to add comments and the UI is basic.
Check the following example:
Show data into table view

white spaces - slack (webhook)

It looks like there is no option post a message containing a table on to slack. I am trying to build a table using text formatting. In the below example the text isn't aligned because first row has text ROW1 and second row has text ROW. Is there a way to add a white space after ROW in order to align this text?
{"text" : "ROW1\t\t\t\tCOL1\nROW\t\t\t\tCOL2"}
Generally speaking, you can use Slack's message builder to test the rendering of your messages.
This being said, while I dont think you can simply "push" spaces to the right, you could use the pipe symbol like this :
"text": "ROW1|\t\t\t\tCOL1\nROW |\t\t\t\tCOL2"
Another possibility, with minor changes, is to use attachements with fields like this
"attachments": [
{
"fields": [
{
"title": "Col1",
"value": "text1",
"short": true
},
{
"title": "Col2",
"value": "text2",
"short": true
}
]
}
]

Highcharts show menu buttons alongside blank title

When you remove the title by setting text to ''
title:{
text:''
},
subTitle:{
text:''
}
all is good and you hide the title. However, if you see the context menu button, it is in the chart area.
I need to show the menu button in the line of chart title but with a blank title. Just a visual enhancement and nothing more.
See this fiddle: http://jsfiddle.net/JVNjs/453/
Use a marginTop in the chart options:
chart: {
marginTop: 40,
renderTo:'container',
borderWidth:1,
plotBorderWidth:1
},

Resources