Highcharts credits link not working when exporting as PDF - highcharts

When I set the credits.href option for a Highcharts chart, everything works well in the browser. The credits text is a clickable link.
However, if the chart is exported as a PDF, the credits text is not a link.
Here is my code:
let exportOptions = {
filename: filename,
fallbackToExportServer: false,
type: 'application/pdf'
};
let chartOptions= {
credits: {
enabled: true,
href: "http://example.com",
text: "TEMA-Q GmbH"
}
}
chart.exportChartLocal(exportOptions, chartOptions);
Am I doing something wrong or are credit urls simply not exported to PDF?

I am afraid that this functionality has not been implemented yet. I reported this idea on the Highcharts Github issue channel where you can follow and vote up this thread.
Link: https://github.com/highcharts/highcharts/issues/13594

Related

Google Action Console(Cloud function editor) How to add image to a Media/MediaObject

Hi i'am working with google assistant, i'am using Action Builder in the Google Action Console. And i working with google Cloud function editor provided in the Action Console to test my webhook. I would like to use a media player to read an mp3 song that i provide with an url. i followed the documentation here : https://developers.google.com/assistant/conversational/prompts-media and i used this code :
app.handle('media', (conv) => {
conv.add('This is a media response');
conv.add(new Media({
mediaObjects: [
{
name: 'Media name',
description: 'Media description',
url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
image: {
large: JAZZ_IN_PARIS_IMAGE,
}
}
],
mediaType: 'AUDIO',
optionalMediaControls: ['PAUSED', 'STOPPED'],
startOffset: '2.12345s'
}));
});
Problem is that this code work when i remove the image but if i keep it i got an error :
Unsuccessful webhook call due to client issue: Error querying agent endpoint. State: URL_UNREACHABLE, reason: UNREACHABLE_5xx.
and in the webhookResponse i got :
"error": "JAZZ_IN_PARIS_IMAGE is not defined"
My question is how to send image in a MediaObject send by a webhook? Where do i have to store my image and how to add it in the response?
In the code snippet, JAZZ_IN_PARIS_IMAGE is not defined directly but is supposed to be an Image object, like png or jpg. A MediaObject can have a large image and/or an icon.
For testing purposes, you can upload a file to your Cloud Storage or just take any image from the web. But when you move forward you really should fix that image URL and provide corrected alt text.
conv.add('This is a media response');
conv.add(new Media({
mediaObjects: [
{
name: 'Media name',
description: 'Media description',
url: 'https://storage.googleapis.com/automotive-media/Jazz_In_Paris.mp3',
image: {
large: {
url: 'https://serebii.net/pokearth/sprites/green/025.png',
alt: 'This is a sprite of Pikachu!',
},
}
}
],
mediaType: 'AUDIO',
optionalMediaControls: ['PAUSED', 'STOPPED'],
startOffset: '2.12345s'
}));
});

Is it possible to use the offline export in stockchart?

Or there is another option for client export without using highcharts servers.
Yes, exporting and offline-exporting also work for Highstock. Example:
Highcharts.stockChart('container', {
exporting: {
fallbackToExportServer: false
},
...
});
Live demo: http://jsfiddle.net/BlackLabel/7j50fwtd/
Docs: https://www.highcharts.com/docs/export-module/client-side-export

Google Docs API : How to update alignment of the table?

I have a Table in the google docs and want to change its alignment to -0.71 but i do not see any Python API to change table properties. This can be done easily using following UI on google UI (as shown below):
I also tries looking at following requests but could not find it:
updateTableColumnProperties
updateTableCellStyle
For debugging, i created a doc with mentioned alignment and tried dumping JSON of it. But i do not see alignment keyword in the JSON.
Thanks #jescanellas for reply.
I found a hack, this may not be the best solution but works.
1) Update paragraph style and set the indentation, alignment as required. Here the start_idx is the index where table needs to be created.
request = [{
'updateParagraphStyle': {
'paragraphStyle': {
'namedStyleType': 'HEADING_5',
'direction': 'LEFT_TO_RIGHT',
'alignment': 'START',
'indentFirstLine': {
'magnitude': -51.839999999999996,
'unit': 'PT'
},
'indentStart': {
'magnitude': -51.839999999999996,
'unit': 'PT'
},
},
'fields': '*',
'range': {
'startIndex': start_idx,
'endIndex': end_idx
}
}
}]
2) Create the table, it will get created at new indented place.
request = [{
'insertTable': {
'rows': 1,
'columns': 1,
'location': {
'segmentId':'',
'index': start_idx
}
},
}]
It's not currently possible to do so. You can create a Feature Request for the Docs API, and you can also subscribe to this one for Apps Script by clicking on the star next to the Issue number to give more priority to the request and to receive updates.
In case of the second request being implemented, you could call the script from the command line using Clasp.

HighCharts Editor Plugin Example not working

So I have the jquery-simple-rest plugin for Highcharts, (same used in the example documentation). I've linked the js file, and am not getting any errors in my browser. The documentation mentions also needing to the highed.use.
//The installer
highed.plugins.editor.install("jquery-simple-rest",{
//Contains information about the plugin - optional
meta:{
version:"1.0.0",
author:"Highsoft",
homepage:"https://github.com/highcharts/highcharts-editor/plugins/jquery-simple-rest.js"
},
//Add additional external dependencies here
dependencies:[
"https://code.jquery.com/jquery-3.1.0.min.js"
],
//This is the prototype options which the plugin accepts
options:{
url:{
required:!0,
type:"string"}
},
//Called when the chart changes
chartchange:function(e,t)
{jQuery.ajax({
url:t.url,
data:e.json,
dataType:"json",
type:"post"
,success:function(){
highed.snackBar("CHART SAVED")
},
error:function(e,t){
highed.snackBar("unable to save chart: "+t)
}
})
}
});
highed.plugins.editor.use('jquery-simple-rest', {options:{
url:{
required:!0,
type:"string"}
},
}
);
I can not get this plugin to appear in my the editor, and have no idea what it is I'm doing wrong.
link to example: https://github.com/highcharts/highcharts-editor/wiki/Plugins

How do I get the Id of a button of a jquery UI dialog?

as the title says....
this is what I have tried but not working
$('#uxReferralAssessmentDetailsDialog').dialog({
autoOpen: false,
modal: true,
width: 400,
title: "Referral Assessment",
buttons: { "Save":{ id: 'uxbtnSaveAssessment', click:othis.OnAssessmentSave}, "Cancel": function() { $(this).dialog("close"); } }
});
I am using selenium and instead of the horrid xpath I want to use the id of each element to simplify the xpath
any ideas welcome
If you are having a hard time determining id as and other things that are being added to the html page by javascript on the fly. Try using a development tool for web browsers like firebug which is an addon for firefox:
See link for firebug addon for more information:
https://addons.mozilla.org/en-US/firefox/addon/1843

Resources