Is possible to add a frame in 3d chart? - highcharts

This is the code for 3D Scatter Chart:
frame : {
bottom : {
size : 3,
color : 'rgba(32,1,0,0.44)'
},
back : {
size : 5,
color : 'rgba(0,0,0,0.44)'
},
side : {
size : 5,
color : 'rgba(0,0,0,0.2)'
}
},
Is it possible to add one more side to the frame? For example:
frame : {
bottom : {
size : 3,
color : 'rgba(32,1,0,0.44)'
},
back : {
size : 5,
color : 'rgba(0,0,0,0.44)'
},
side : {
size : 5,
color : 'rgba(0,0,0,0.2)'
},
top : {
size : 3,
color : 'rgba(32,1,0,0.44)'
}
},
I have added colors on each side, but I want to add color on top as-well. Is this possible?

It's not really possible.
According to the documentation, frame has only three properties:
back
bottom
side

Related

EventListener issues for images in ScrollableView for IOS Appcelerator

I have added some images in two different views & placed them inside a ScrollableView. On click of images, EventListener is not getting executed. This code works perfectly for Android(appcelerator) but for IOS it's not working.
Scroll & other Events are working fine. The problem seems with items placed in ScrollableView.
var dataView = Ti.UI.createView({
layout : 'horizontal',
top : '0'
});
var textHolderView = Ti.UI.createView({
layout : 'vertical',
width : '50%'
});
var iconView = Ti.UI.createView({
layout : 'horizontal',
width : '24.5%'
});
var header = Ti.UI.createLabel({
text : "Some Text",
font : {
fontSize : '12dp',
fontFamily : 'OpenSans-Semibold',
fontWeight : 'normal'
},
height : '38dp',
left : '15%',
color : '#000',
width : '85%',
touchEnabled : false
});
var image1 = Ti.UI.createImageView({
image : "/images/individual.png",
height : '18dp',
left : '5dp',
width : '13%',
top : '25%'
});
var slideOptionsView = Ti.UI.createView({
backgroundColor : "#1268b3",
layout : "horizontal"
});
var img_activity = Ti.UI.createImageView({
image : "/images/activity_temp.png",
height : "30dp",
width : "70dp",
left : "10%",
top : "15dp",
touchEnabled : true
});
textHolderView.add(header);
iconView.add(image1);
dataView.add(textHolderView);
dataView.add(iconView);
slideOptionsView.add(img_activity);
var scroll = Ti.UI.createScrollableView({
views : [dataView, slideOptionsView],
showPagingControl : false,
});
// Event Listeners on click for above images
img_activity.addEventListener('click', function(e) {
alert("img_activity");
});
image1.addEventListener('click', function(e) {
alert("image1");
});
$.someView.add(scroll);
$.index.open();
Thanks.

Change width of route in Skobblers SKMaps for iOS

I would like to change the route width of a calculated route. Using Skobblers SKMaps Framework.
I've successfully used this thread (How to change the color of the route in Skobbler) to change the route color, but if I change the width in the daystyle.json nothing seems to change. I tried all kinds of values (1.0, 1.9, 2.5, 10.0, 100.0) but the width remains the same. No matter if the map is in navigation mode or not.
The id for the route is 0. You need to change the width values for the 0 attribute. In this example the width is set to 2.0 for the zoom level 4:
{
"id" : "0.4",
"isattribute" : true,
"line" :
{
"fill" :
{
"color" : "FF0000",
"width" : 2.0
},
"outline" :
{
"color" : "0080FF",
"width" : 1.0
},
}
},

transparent erase in iOS- Titanium

I have two images one on the above and i want to erase a small part from the top image to show the background image. Is it possible transparent erase using titanium for iOS?
Thanks and regards,
GANESH M
You can do this using the ti.paint module. Specifically, its ability to have an image on the canvas which can be erased. After installing, try this:
// Container window
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
// Background image
var backgroundImage = Ti.UI.createImageView({
image : 'yourbgimage.png'
width : Ti.UI.FILL,
height : Ti.UI.FILL
});
// Require paint module and add to view with an erasable image
var Paint = require('ti.paint');
var paintView = Paint.createPaintView({
image : 'yourfgimage.png', // This is the image you erase
eraseMode : true,
width : Ti.UI.FILL,
height : Ti.UI.FILL,
strokeColor : '#0f0', strokeAlpha : 255, strokeWidth : 10
});
win.add(backgroundImage);
win.add(paintView);
win.open();

How to customize graph title and subtitle

I want to customize my charts mostly the title and subtitle like the attached image. Please suggest!
Also I like to add gradient in the area charts.
Is it possible to design chart like this ?
You can set useHTML as true, and in the title text i.e define two divs (left / right content) with correct CSS styles.
text: '<div class="lhsTitle">My custom title</div><div class="rhsTitle">Right content</div>',
CSS
.lhsTitle {
float:left;
}
.rhsTitle {
float:right
}
.highcharts-title {
width:80%;
}
http://jsfiddle.net/sbochan/BETBk/
You can add a linear gradient to the series with the following snippet of code:
... //inside Highcharts chart object
series : [{
name : "Series name",
type : "area",
fillColor : {
linearGradient : [0, 0, 0, 300],
stops : [
[0, Highcharts.getOptions().colors[3]],
[1, 'rgba(2,0,0,0)']
]
},
data: [...]
}]
as shown in the following example: http://jsfiddle.net/aNtnm/

Highstocks rounding values, and range not accurate for more then two hours of viewing

I am using highcharts to perform sensor graphing for basic temperatures, or things of that nature. The issue is I have the current default view set at 3 days, but at that view it distorts the y axis data values.
For example, if the majority of the data is 1.5 but there is a value of 10 also, in the three day view the y axis is only showing a range up to 3 or 4. It shows the spike in the actual line graph however when you hover over the point the value is 3 or 4 instead of 10. However, if I shrink the view to 2 hours, the data gets displayed properly and the value then returns to 10 and the y axis accomodates the 10 value.
Also I am having issues with the data being rounded down constantly it seems, since the values should be a steady 1.5 it is constantly being rounded down to 1.
Any help will be appreciated and I will be around the computer all day to answer any questions that someone might have about this issue.
$.getJSON('mkjson.php?device=<?echo $device_name;?>&sensor=<?echo $sensor_name;?>&pin=<?echo $pin;?>&user=<?echo $_SESSION['user'];?>', function(data) {
// Create the chart
window.chart = new Highcharts.StockChart({
chart : {
renderTo : 'container',
zoomType: 'x'
},
rangeSelector : {
selected : 1
},
title : {
text : 'Device:<?echo $device_name;?>'
},
subtitle : {
text : 'Sensor:<?echo $sensor_name;?>'
},
xAxis : {
minRange: 600 * 1000 // one hour
},
yAxis : {
title : {
text : '<?echo $unit;?>'
}
},
rangeSelector : {
buttons : [{
type : 'minute',
count : 10,
text : '10m'
}, {
type : 'hour',
count : 1,
text : '1H'
}, {
type : 'day',
count : 1,
text : '1D'
},
{
type : 'day',
count : 3,
text : '3D'
}],
selected : 3,
inputEnabled : false
},
series : [{
name : 'Voltage',
data : data,
tooltip: {
valueDecimals: 2
}
}]
});
});
This is the example of how the data is skewed. The high points to the right are 10, and 13 yet they show up at only 3.
Have a look at dataGrouping as it lets you determine how to group or to have it off completely. It defaults to enabled.
Have you tried to use numberFormat() http://api.highcharts.com/highstock#highcharts.numberFormat()
I've been burned by the auto-rounding; the chart does some sort of value rounding for its internal representation of points.
I only have a workaround - I got around it by storing the data points in a separate array and referencing THAT in the tooltip function.
As of note, if you're using column data and don't turn data grouping off, the chart will round your X values too.

Resources