I don’t really see a custom/skin.js file.
I see /application/skin.js, which has the following:
/* CHART X-AXIS */
xAxis: {
lineColor: '#000',
tickColor: '#000',
labels: {
style: {
color: '#000',
font: '11px "Lucida Grande", Helvetica, Arial, sans-serif'
}
},
title: {
style: {
color: '#333',
font: 'bold 12px "Lucida Grande", Helvetica, Arial, sans-serif'
}
}
},
Is that what you’re referring to?
I guess I’m not sure why it doesn’t work with the way everything is already
defined.
The /application/app-config.js has the column defined correctly:
var column_config_1 = { constraint:"Year", constraintType: "range-unbucketed",
dataType:"xs:gYear", title:"CountsByYear", dataLabel: "Year",
measureLabel:"Count" };
So, to me, I’m not sure what I’d override that with in the
/custom/app-config.js file.
The /application/app.js creates it:
var column_1 = ML.chartWidget("widget-1", "column", column_config_1);
and it looks like /application/lib/viz/chart/chart.js is actually setting the X
axis (I guess this is the horizontal one?) to “datetime” if the type is date
(which it appears gYear is*):
/* set date axis labeling options for date based series */
if (isDate) {
chartOptions.xAxis.type = 'datetime';
chartOptions.xAxis.dateTimeLabelFormats = {
second: '%H:%M:%S',
minute: '%H:%M',
hour: '%H:%M',
day: '%e',
week: '%e',
month: '%b',
year: '%Y'
};
* dateDataTypes =
["year","gYear","gMonth","gDay","gMonthDay","gYearMonth","date","time","dateTime"];
The tick interval doesn’t really seem to be addressed for gYear:
getTickInterval = function () {
var tickInterval = null; // defaults to null, allow HC to handle
tick rendering
// custom rendering of ticks for gMonth, gDay, time
if (isDate && ($.inArray(dataType,['gMonth','gDay','time']) !== -1))
{
switch(dataType)
{
case "gMonth":
tickInterval = 1000 * 60 * 60 * 24 * 31 * 2; //
every other month
break;
case "gDay":
tickInterval = 1000 * 60 * 60 * 24 * 2; // every
other day
break;
case "time":
tickInterval = 1000 * 60 * 240; // every 4 hours
break;
default:
break;
}
}
return tickInterval;
So, I guess it’s “null” for gYear?
I’m not the best at javascript so I’m most likely missing something…
From: [email protected]
[mailto:[email protected]] On Behalf Of Shannon
Sent: Thursday, September 11, 2014 12:12 PM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Odd or Expected Behavior by Widget?
David, this may be neither here nor there, but have you tried setting the axis
type in custom/skin.js to "datetime”?
Shannon
On Sep 11, 2014, at 8:36 AM, Steiner, David J. (LNG-DAY)
<[email protected]<mailto:[email protected]>> wrote:
ML 7.0-3
I created a field that has years in it, i.e., 2010. I set the range index on
it to be “gYear”.
I specified a Widget in App Builder to use the Field so I can get the Count of
all occurances of each year. The chart that it produced is confusing – start
with midnight and goes for 48 seconds?
<image001.png>
Is this expected behavior for “gYear” range indexes, or do I have to do
something to get the year values to appear as the “Year” axis?
Thanks,
David
_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general