Displaying 2 different values in Vega Text Field - vega

I would like to use 2 values in a Vega Text Mark, but there is little documentation for this old version of Vega (Vega 1.5.0).
I would like it to show up something resembling: Name: Value, but I cant find a way to get it to work.
This is my current definition JSON implementation, and it shows the text fine, I just can't get it to show another
"text": { "field": "data.name" },
I have tried something like this to no avail, any advice?
"text": {"field": "data.name", "field": "data.value" },
Have now also tried using the transform calculate as suggested, using it as such within the transform block. And referring to tooltip in the text field. This has also not worked.
{
"calculate": "data.name + ':' + data.value", "as": "tooltip"
}
Conclusion: In Vega 1.5.0 this is seemingly not possible, Following suggestions has not resulted in the desired solution. If you are looking to do this in such an old version of Vega, I would recommend you update Vega to a newer version.

Use a calculate transform to concat your text values and use that new field.

Related

vuejs set a layout in js and run that in template

Title sounds a bit weird but let me explain.
I made a component that allows me to generate dynamic input fields based on a json list.
Only some fields I would like to have next to each other and that is not possible in the current construction. So I came up with an idea to make a JSON "layout template" with rows and columns and which ID field belongs where.
For example "layout template":
{
"row": {
field: {id:"ID-FIELD-1",type:"text"}
},
"row": {
field: {id:"ID-FIELD-2",type:"phone"},
field: {id:"ID-FIELD-3",type:"email"}
},
"row": {
field: {id:"ID-FIELD-4",type:"text"}
}
etc...
}
Now I can make a JSON "layout template" and put an "input component" in each field. This "input component" then loops to the correct type of input field. Only this seems a bit too much to go through the input list every time looking for the right type for each field.
So I've been looking for ways in javascript to setup/format the whole template in a "string" like way and have it picked up by Vuejs as if it were a standard ....
Then I dont have to loop the whole field section every time.
I don't know if this is possible or if there are other ways to do this?

div component in form generation (by schema) not working as expected

In a sample project, I placed the "Flexbox Wrapper" code sample here (picking from the drop-down list)
The code below is meant to create 2 columns for the children form components of cheese options and toppings:
...preceding code...
{
"component": "div",
"class": "flex-wrapper",
"children": [
....
However it shows both as one column (see image attached.) I have absolutely no other styling asides the header link pointing to the default snow.min.css at by CDN.
This is so basic, surprised it's not working as documented. Is there any implicit step I have missed to get this working?
Also not sure why the heading, represented by an 'h3' component in the schema, is appearing as a different font.

using triggers to store interaction history, but seeing null values

I was looking at triggers to store the sequence of brush signals. Here is the link to the editor with the full spec. The relevant code I added is here:
{
"name": "selected",
"on": [
{"trigger": "detailDomain", "insert": "detailDomain"}
]
}
However, when I look at the data viewer (in the editor), I don't see any values (I think null values are being inserted). I'm not sure what I'm doing wrong. Thanks for the help!
It turned out that the Vega editor had a bug. The events are actually captured!

Is it possible to use yadcf "ranger_number_slider" in server side processed datatables?

I need some help.
I have a server side processed jquery.datatable. One of the columns is a numeric col with values between 0 and 180.
I would like to filter this column with yadcf ranger_number_slider. I set the yadcf like this:
{
column_number: 14,
filter_type: 'range_number_slider',
filter_container_id: 'external_filter_container_ZZ'
}
But I am faced with some problems:
On the first page of the datatable (paging size is 10, number of entries is roundabout 10.000), the values of this specific column are (accidentally) only from 0 to 30. The ranger_number_slider shown in the div "external_filter_container_ZZ" is as shown below:
Ranger-Number-Slider
As you see in the image, the slider is set from 0 on the left side to 30 on the right side. It seems, that the slider doesn´t get all values from the server side processing for this specific column.
Furthermore: If I try to select some values in the slider, the result in the table is always empty, and the slider disappears!
Is anybody able to give some hints for this behaviour?
Thank you very much in advance.
Best regards
BeSt
Not only that its possible, its available on the showcase page - see here, you must do some reading in the docs / showcase (source on github too) and you will find all the needed docs for that, in short: in addition to your table data that is sent form server to client you must provide yadcf with its data as well - populate the yadcf_data_COL_NUM with the relevant data,
aaData:[["Trident", "Internet Explorer 4.0", "Win 95+", "7/24/2015", "1"],…]
draw:"2"
recordsFiltered:6
recordsTotal:57
yadcf_data_0:[{value: "Trident", label: "Trident Eng'"}, {value: "Tasman", label: "Tasman Eng'"},…]
yadcf_data_1:["Nintendo DS browser", "Netscape Browser 8", "All others", "Lynx", "Mozilla 1.6", "Mozilla 1.5",…]
yadcf_data_2:["N800", "Win 95+ / Mac OS 8.6-9.2", "S60", "KDE 3.5", "Win XP SP2+", "KDE 3.3", "OSX.3", "KDE 3.1",…]
yadcf_data_4:["134", "0"] <- this is for range slider filter tips
From showcase docs
//In case that you want to populate your select / auto_complete
filters with values //you have to add to your current JSON the
following attributes yadcf_data_0 / yadcf_data_1 / etc' //where each
attribute contains a list of strings //For example:
//"yadcf_data_0":["KHTML","Webkit","Trident","Misc","Other
browsers","Tasman","Presto","Gecko"],

Make a standard PDF fillable

I would like to transform a standard PDF into a fillable one.
My original PDF contains forms and text area to be filled.
Moreover, is it possible to add a "send-by-mail" button at the botton of the PDF ?
I would prefer ubuntu-compatible opensource tools,
But I will go for windows if needed.
Thanks a lot,
You can use free/open source Dhek template editor, to define in a separate file (in JSON format) the areas (bounds, and related properties) where you want to write/fill dynamic data at some point with extra data over any existing PDF.
Example of JSON template format: (see documentation)
{
"pages": [
{ /* mappings for first page, index 0 */
"areas": [
{ /* first area of first page */
"type": "text"/* or "checkbox"*/
"height": 10.23/* pt */,
"width": 23.456,
"x": 0.1234/* pt */,
"y": 2.45,
"name": "Field name"
}
/* , other areas ... */
}
/* , other pages ... */
]
}
You can have a look at it at the GitHub Project with binary releases available for Windows 7+ and Mac OS X 10.9+ .
An integration example in PHP using FPDF library is available online.
That's a case for Acrobat (Standard would work, but Pro is preferrable).
You may be quite successful by using the field recognition function in Acrobat, otherwise, you will add the fields manually in the Form Edit mode.