Jimin Huang commited on
Commit
7240d16
·
1 Parent(s): 77daf04

Change settings

Browse files
src/assets/images/agents_images/investor.png ADDED

Git LFS Details

  • SHA256: bb7323b9c3a034abb4869db01a6f2945b25239a106ee09a22a88904531cfbb6d
  • Pointer size: 130 Bytes
  • Size of remote file: 64.9 kB
src/components/CompareChartE.vue CHANGED
@@ -174,6 +174,8 @@ async function composeBadge(agent, model, color = '#666') {
174
  return url;
175
  }
176
 
 
 
177
  export default defineComponent({
178
  name: 'CompareChartE',
179
  components: { VChart },
@@ -253,10 +255,14 @@ export default defineComponent({
253
  type: 'line',
254
  showSymbol: false,
255
  smooth: false,
256
- emphasis: { focus: 'series' },
 
 
 
257
  lineStyle: { width: 2, color: getAgentColor(agent, idx) },
258
  data: points
259
  })
 
260
  const last = points?.[points.length - 1];
261
  if (last && Number.isFinite(last[1])) {
262
  const lineColor = getAgentColor(agent, idx);
@@ -268,7 +274,22 @@ export default defineComponent({
268
  symbol: badgeUrl ? `image://${badgeUrl}` : 'circle',
269
  symbolSize: 30,
270
  z: 20,
271
- tooltip: { show: false },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  label: {
273
  show: true,
274
  position: 'right',
 
174
  return url;
175
  }
176
 
177
+ let markerToLine = new Map()
178
+
179
  export default defineComponent({
180
  name: 'CompareChartE',
181
  components: { VChart },
 
255
  type: 'line',
256
  showSymbol: false,
257
  smooth: false,
258
+ emphasis: {
259
+ focus: 'series',
260
+ lineStyle: { width: 3.5 },
261
+ },
262
  lineStyle: { width: 2, color: getAgentColor(agent, idx) },
263
  data: points
264
  })
265
+ const lineSeriesIndex = series.length - 1;
266
  const last = points?.[points.length - 1];
267
  if (last && Number.isFinite(last[1])) {
268
  const lineColor = getAgentColor(agent, idx);
 
274
  symbol: badgeUrl ? `image://${badgeUrl}` : 'circle',
275
  symbolSize: 30,
276
  z: 20,
277
+ tooltip: {
278
+ trigger: 'item',
279
+ appendToBody: true,
280
+ formatter: (p) => {
281
+ const v = p.value?.[1]
282
+ const val = this.mode === 'pct'
283
+ ? `${v >= 0 ? '+' : ''}${Number(v).toFixed(2)}%`
284
+ : Number(v ?? 0).toLocaleString(undefined, { style: 'currency', currency: 'USD', maximumFractionDigits: 2 })
285
+ return [
286
+ `<div style="font-weight:600">${sel.agent_name}</div>`,
287
+ sel.model ? `<div style="opacity:.8">${sel.model}</div>` : '',
288
+ `<div style="opacity:.8">${sel.asset}</div>`,
289
+ `<div style="margin-top:4px">${val}</div>`
290
+ ].join('')
291
+ }
292
+ },
293
  label: {
294
  show: true,
295
  position: 'right',