Comments (2)
Done by me.
I have introduced new Configuration options : groupByRowNameLabel
timeline.groupByRowNameLabel Type: boolean Default: false
I changed the file https://www.gstatic.com/charts/51/js/jsapi_compiled_timeline_module.js
Rewrote part of the code gvjs_i4.prototype.$g = function () {};
`gvjs_i4.prototype.$g = function () {
var a = this.gb.WH.index,
b = this.Z.Sj(this.gb.vL.index).min,
c = this.Z.Sj(a).max;
a = this.m.fa("hAxis.minValue", b);
var d = this.m.fa("hAxis.maxValue", c);
a = Math.min(b, a);
c = Math.max(c, d);
d = this.Z.ca();
var e = {};
b = [];
bb = [];
for (
var f = new Set(),
g = gvjs_K(this.m, "timeline.groupByRowLabel", !0),
gg = gvjs_K(this.m, "timeline.groupByRowNameLabel", 0), // по умолчнию false
h = gvjs_K(this.m, gvjs_nx, !0),
k = gvjs_ry(this.m, gvjs_px),
l = 0;
l < d;
l++
) {
var m = l;
var n = this.Z;
var p = this.gb,
q = n.getValue(m, p.qw.index),
r = null === p.tt ? "" : n.getValue(m, p.tt.index),
t = n.getValue(m, p.vL.index),
u = n.getValue(m, p.WH.index),
v = "",
w = null;
if (null == t || null == u) throw Error("Missing value in row " + m + ".");
p.tt && p.tt.Nf.style && (v = n.getValue(m, p.tt.Nf.style));
p.tt && p.tt.Nf.tooltip && ((p = p.tt.Nf.tooltip),
(n = n.getStringValue(m, p)),
null != n && (w = {
Nh: !(!this.Z.getProperty(m, p, gvjs_av) && !this.Z.Bd(p, gvjs_av)),
content: n,
}));
if (t > u)
throw Error(
"Invalid data at row #" + m + ": start(" + t + ") > end(" + u + ")."
);
// Part source code, chenge switch added check qq groupByRowNameLabel
// g && gvjs_Ze(e, q)
// ? (n = gvjs_Sy(e, q))
// : ((n = {
// name: q,
// label: null,
// vJ: [],
// Mb: [],
// rect: new gvjs_5(0, 0, 0, 0),
// }),
// gvjs_Ze(e, q) || gvjs_Ry(e, q, n),
// b.push(n));
//END Part source code
if ( g && !gg && gvjs_Ze(e, q)) {
(n = gvjs_Sy(e, q))
} else if ( g && gg && gvjs_Ze(e, q) ) {
((n = {
name: q,
label: null,
vJ: [],
Mb: [],
rect: new gvjs_5(0, 0, 0, 0),
}),
gvjs_Ze(e, q) || gvjs_Ry(e, q, n),
bb.push(n));
} else {
((n = {
name: q,
label: null,
vJ: [],
Mb: [],
rect: new gvjs_5(0, 0, 0, 0),
}),
gvjs_Ze(e, q) || gvjs_Ry(e, q, n),
b.push(n));
};
m = {
name: r,
uya: q,
G7: null,
RN: null,
rect: new gvjs_5(0, 0, 0, 0),
Pt: { start: t, end: u },
row: m,
oga: v,
tooltip: w,
$f: h,
Dp: k,
};
n.Mb.push(m);
m = !m.name || this.s8 ? n.name : m.name;
f.add(m);
null != this.aE && this.aE.Au(m);
}
if ( bb != '' ) {
bb.forEach(function(bbLine) {
let bbSystemName = bbLine.name;
let bbProccesName = bbLine.Mb[0].name;
let bbProcces = bbLine.Mb[0];
let bbFlag = true; // флаг на добавление
b.forEach(function(bLine) {
if ( bbSystemName == bLine.name && bbProccesName == bLine.Mb[0].name ) {
bLine.Mb.push(bbProcces);
bbFlag = false;
};
});
if ( bbFlag ) { // Если флаг true добавляем каждый индекс bb полностью в b
b.push(bbLine); // добавляет в основой массив
};
});
};
gvjs_1pa(b);
d = gvjs_2pa(this, b);
e = 0;
0 < b.length && ((e = b[b.length - 1].rect), (e = e.top + e.height));
f = Math.min(e, this.eb.height - 50);
f === this.eb.height - 50 && (this.WS = this.jwa());
this.axis = new gvjs_1S(
this.eb.width - this.WS - d,
a,
c,
d,
d,
this.WS,
gvjs_J(this.m, "hAxis.format")
);
gvjs_3pa(this, b, d);
gvjs_K(this.m, "timeline.showBarLabels", !0) && gvjs_4pa(this, b, d);
this.axis.xp = f;
a = gvjs_J(this.m, gvjs_qx, gvjs_xu) === gvjs_xu;
c = gvjs_K(this.m, "timeline.displayDuration", !0);
f = this.m.cb("timeline.tooltipDateFormat");
return {
size: this.eb,
background: {
rect: new gvjs_5(0, 0, this.eb.width, this.eb.height),
brush: gvjs_qy(this.m, gvjs_ht),
rka: gvjs_K(this.m, gvjs_Vs, !0),
},
yF: b,
rect: new gvjs_5(0, 0, this.eb.width, e),
xsa: d,
nY: this.axis.PC,
cna: a,
$ma: c,
nya: f,
};
};`
from google-visualization-issues.
Part of the code is here:
https://docs.google.com/document/d/1h8jLV-oEkwUrEjwJpR0RFj5cKpfFug1I4fIW5YEWKVI/edit?usp=sharing
from google-visualization-issues.
Related Issues (20)
- Sankey charts - same node and multiple links but with different colors
- Diff Chart- Tooltip Issue HOT 1
- How to Add Space Between Legend Labels
- How To Change Legends shape
- Issue generating QR Code from URL with multiple arguments HOT 2
- googole chart Qr if exist :// and chinese error
- ISO 3166-2 data for Kazakhstan Provinces is not updated yet
- API not working HOT 6
- Regarding Deprecated QR Code API HOT 7
- viewWindow ignored in log-log plots
- Pie Chart Sometimes Not Adding Up to 100%
- Angular Google Line Chart - The Line gets cut/breaks for some particular data points.
- Can't get my stacked column to stack the right data
- Google Gauge Chart Array with different options
- Unable to Access Google Charts API Reference Documentation HOT 3
- https://chart.googleapis.com/ is not Loding HOT 1
- Chart API throwing 404 HOT 2
- The "query" operator's undocumented filter "skipping"
- Chart Google API QR Code Does Not Work Anymore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-visualization-issues.