dataviz: How to set lineWidth property for chart - html

I am using dataviz lib. for creating chart using Keen-io.
The chartType I am using is line and spline when I used
.chartOptions({ curveType: "function",
lineWidth: 10 })
I am not able to see the line width change.
Please Help!!

It'd be great to see a jsfiddle or something showing your issue. I just created a fiddle using chartOptions and lineWidth, and it seems to be working swimmingly for me.
Fiddle: http://jsfiddle.net/aqbtrxa8/11/
Code:
client.draw(query, el, {
chartType: "linechart",
height: 400,
chartOptions: {
lineWidth: 10
}
});

Related

How do i hide a layer from layerlist in ArcGIS 4.x Javascript API though i still want it to show up in the map?

I would like to remove Facilities in the layerlist, but still have it show up in the map.
var manned_facilities_back = new MapImageLayer({
url: "http://dotdevgisiis02:6080/arcgis/rest/services/DOT_MAP_PORTAL/Facilities/MapServer",
sublayers: [
{
id: 1,
popupTemplate: templateFT,
},
{
id: 0,
popupTemplate: templateMF,
},
]
I've attempted to add
listmode: hide
or
display: none
under where i have url, but it didn't work. I figure this should be really simple.
Setting the property Layer.listMode to "hide" should work as expected. In your example, make sure you use the correct casing:
var layer = new MapImageLayer({
url: "http://dotdevgisiis02:6080/arcgis/rest/services/DOT_MAP_PORTAL/Facilities/MapServer",
listMode: "hide"
});
Here's a live demo hiding one of the layers from the loaded WebScene:
https://codepen.io/arnofiva/pen/eb198c9b4050b892759ef433e8664fac

Extra spaces in <pre> tag

I have this issue with my pre tag that I have been trying to resolve for a while now. I have tried almost 20 suggestions that I have found and none of them seem to work.
I have a server running with node.js that has 2 websites on it, technically it's one website with 2 layouts. If I try using pre-tag on my 1st layout, everything seems to be displaying normally, however on my 2nd page I guess extra tabs that I can't seem to locate.
Here is what I have:
<pre><pre><code >
<script>
new Chart(document.getElementById("bar-chart"), {
type: 'bar',
data: {
labels: ["Blue", "Black", "Green", "Silver", "Red"],
datasets: [
{
label: "Votes for this color: ",
backgroundColor: ["#3e95cd", "#000000", "#35d90e", "#c0c0c0", "#c45850"],
data: [120, 384, 81, 223, 192]
}
]
},
options: {
legend: { display: false },
title: {
display: true,
text: 'Best Car Colors according to a 1000 votes survey'
}
}
});
</script>
</code></pre></pre>
and it is displaying like this:
Visuals
anyone have any idea what and why? I have tried unsetting all css and re-setting pre tag, but it does exactly the same thing.
Updated:
For all those who were and are still struggling with same issue, I found the problem! So I am using handlebars, and one the features is called "partials"
and I had a page that called on those partials, in this manner:
{{>crashcorse/intro_lessons}}
however it had some extra spaced before the {{> }} tag, due to auto formatting, removing these extra spaced seem to solved the issue.

Highcharts - How to remove connecting line between fixed tooltip and point

We've just updated to the latest Highcharts version and now a few of our chart types have a new line connecting the tooltip to the point.
It's mainly obvious on charts with fixed tooltips.
Does anyone know how to remove this line without removing the border of the tooltip itself?
I have come up with a work around that involves setting the borderwidth of the tooltip to 0 and adding a rounded, bordered, coloured div to the tooltip using useHTML:true and disabling the shadow.
Though I dont want to do this for every chart as it seems a bit nasty.
This also affects bar and tree maps that I can see and I've trawled the documentation to no avail.
http://jsfiddle.net/mattscotty/bqw4bc4x/1/
Highcharts.chart('container', {
title: {
text: 'Fixed tooltip'
},
tooltip: {
positioner: function () {
return { x: 80, y: 50 };
},
backgroundColor: 'rgba(255,255,255,0.8)',
//Uncomment below to remove line, but this also removes tooltip border
//borderWidth:0,
//shadow:false
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar']
},
series: [{
data: [29.9, 71.5, 106.4]
}, {
data: [194.1, 95.6, 54.4]
}]
});
Thanks in advance.
By default tooltip's shape is set to a callout which has a chevron/line pointing to the point. You can change the tooltip's shape to, e.g. rectangle - which does not have any connector.
tooltip: {
positioner: function () {
return { x: 80, y: 50 };
},
backgroundColor: 'rgba(255,255,255,0.8)',
shape: 'rect'
example: http://jsfiddle.net/bqw4bc4x/2/
The accepted answer only partially worked in Highstock. The connectors for the volume and indicator tooltips were suppressed, but I still had a connector from the DateTime box to the crosshair.
As an alternative to the shape: 'rect' hack, you can try:
tooltip: {
positioner: function () {
return { x: 80, y: 50 };
},
split: false,
shared: true,
backgroundColor: 'rgba(255,255,255,0.8)'
These split: and shared: settings consolidate all the tooltip boxes into a single box. Provided that this meets your needs it seems to solve the connector issue.
Very odd design decision by Highcharts. The connectors are highly intrusive visually and I can't imagine that many designers will want to use them, but you can only disable them with a hack. What were they thinking?

Highmaps - Printing resizes the map on Chrome

On Google Chrome, printing a Highmap makes it resize and stick to the left. But the map won't take its initial shape after printing. See this Fiddle : http://jsfiddle.net/5u6z7csf/1/
The code is very basic :
$(function () {
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=germany.geo.json&callback=?',
function (geojson) {
var data = Highcharts.geojson(geojson, 'map');
$('#container').highcharts('Map', {
series: [{
data: data
}]
});
});
I tested it on IE and Firefox and it works fine using them.
Is there a way to walk around this problem ?
Thank you for the reporting, it is requested here

How does CreateJs encrypt a path

I have following code which is responsible to generate a text, But i don't understand how does CreateJs is encrypting this text
this.shape_12.graphics.f("#00ADEA").s().p("Ag1Q...");
where .p("") is responsible for the rendering of text "Nursing",
I am stucked here because i want to change this text to the "MyArticle". any help how can i do this.
(lib.text_1_5 = function (mode, startPosition, loop) {
this.initialize(mode, startPosition, loop, {});
// timeline functions:
this.frame_0 = function () {
this.link = "Nursing";
this.on("click", function (event) {
canvasStageRef.onItemClick();
});
}
// actions tween:
this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0));
// Layer 1//fontcolor
this.shape_10 = new cjs.Shape();
this.shape_10.graphics.f("#FF0000").s().p("AgsFJQgLAAgIgDQgIgDgFgGQgGgGgDgKQgCgJAAgMQAAgVAIgMQAIgNAPgCIAAAbQgEACgDAFQgEAEAAAKQAAALAGAGQAFAGALAAIALAAIAAgBQgFgEgEgHQgDgGAAgKQAAgLAFgLQAHgKAKgGQALgHAOAAQAPAAAMAGQAKAFAHAKQAGAKAAANQAAAKgEAHQgDAHgGAFIAAAAIAKAAIAAAagAgREHQgHAGAAALQAAAIADAGQAEAFAGADQAGACAGAAQAIAAAGgDQAGgCAFgGQADgFAAgIQAAgLgIgGQgGgGgOAAQgLAAgHAGgAg0DaIAAgbIA9AAQAIAAAFgFQAFgEABgJQgBgJgGgGQgHgGgLAAIg3AAIAAgbIBkAAIAAAbIgOAAIAAAAQAJAFADAIQAFAHAAALQAAAKgFAIQgFAIgJAFQgIAEgMAAgABABrIAAgbIAZAAIAAAbgAg0BrIAAgbIBkAAIAAAbgAgoA+QgIgFgDgKQgEgJgBgNQAAgXALgKQAJgMAQgBIAAAXQgIABgEAGQgFAGABAJQAAAJADAFQADAFAGAAQAEAAADgEIADgKIADgNIAFgQQADgIAEgFQAGgFALAAQALAAAIAFQAHAGADAHQAEAKAAALQAAAVgKALQgIALgQABIAAgYQAIgBAEgFQADgFAAgJQAAgIgDgFQgDgEgGgBQgEABgCADIgEALIgCAOQgCAIgDAJQgDAIgFAFQgFAGgNAAQgKAAgHgGgAAZgbIAAAAQABgOgHgIQgHgJgPAAIgxAAIAAgbIBkAAIAAAaIgRAAIAAABQAKAEAEAGQAFAGgBAJIAAAEIgBACgAg0hmIAAgbIALAAIAAAAQgGgFgEgHQgEgHgBgLQABgRAKgJQAJgJASAAIBCAAIAAAbIg+AAQgJAAgEAEQgGAEAAAJQABAJAGAGQAHAFAKAAIA5AAIAAAcgAg0jVIAAgcIBNgxIAIgFIAIgDIADgCIAAAAIgEAAIgKAAIgLAAIhHAAIAAgcICNAAIAAAdIhQAwIgJAEIgGAEIgDACIAAAAIAEAAIAHAAIALgBIBMAAIAAAdg");
this.shape_10.setTransform(-1.5, -9);
this.timeline.addTween(cjs.Tween.get({}).to({ state: [{ t: this.myText }] }).wait(1));
above code is responsible to render text Nursing(in .p("ahskjhsja");)... plz suggest which thing i will replace to make it text that is not render with path... it can change manually..
if this is possible with Text than how i can acheive plz help.. :(
This is not an encryption but path specification similar to path in SVG. You can define complex path by hand but when you need to draw a text data you should really try Text first.
Yes i got a solution with above answer .. and also giving exact right answer,, Thanks to #oleg and Lanny
this.shape= new cjs.Text("Cardic surgery", "bold 17px Arial", "#9aac5a");
this.shape.setTransform(25, -118, 1.0, 1.0, 90, 0, 0, -30, 1.0);
this.timeline.addTween(cjs.Tween.get({}).to({ state: [{ t: this.shape }] }).wait(1));