Page MenuHomePhabricator

Port weather graph template
Open, LowPublic

Description

The old graph on https://eu.wikipedia.org/wiki/Altsasu using this template:

wiki
{{Graph:Weather monthly history
| width=900
| table=Altsasu-alsasua-MAN.tab
| title=Altsasuko hilabeteroko eguraldiaren grafikoa
}}

used to render like this:

c789087360de39e5714c884812ce27bd75006b10.png (475×559 px, 58 KB)

To achieve this three relatively generic features need to be added to echarts which when brought together should be able to replicate something similar to this chart. All three features have use cases and should be built to operate independently of each other in order to maximise value and usability.

  • Waterfall charts
  • Ability to set the feature colours based on some value in a range
  • navigation scroll. This seems fairly well supported natively in echarts via datazoom.

Event Timeline

bvibber updated the task description. (Show Details)

No, it didn't render like that.

Theklan renamed this task from Port weather graph template on [[:eu:Altsasu]] to Port weather graph template.Jun 10 2025, 7:52 PM

No, it didn't render like that.

That's what it looks like in the wayback machine going back a couple years. Can you provide an alternate rendering?

That's the population graph, not the weather graph. There are two graphs in the same article.

That's the population graph, not the weather graph. There are two graphs in the same article.

Confirmed, apparently the population graph renders on archive.org but the weather doesn't. Or else I looked at a version without it. My apologies!

I'll break this task out into three more generic aspects:

  • Waterfall charts - I believe the closest native support within echarts is this chart type. I've played around with it in the sandbox and though its marginally more complex that the existing chart types, it doesn't seem unrealistic for someone to be able to add this type of support in the future.
  • Ability to set the bars colour based on some value in a range - Based an initial exploration for bar type charts this looks fairly easy and probably should work here (see below). In theory this seems fairly extensible to other chart types but would require more complexity to ensure proper support across different chart types.
visualMap: {
  orient: 'horizontal',
  left: 'center',
  min: 10,
  max: 200,
  text: ['Many Coffees', 'Few Coffees'],
  // Map the score column to color
  dimension: 1,
  inRange: {
    color: ['#FD665F', '#FFCE34', '#65B581']
  }
},
  • Next is the navigation scroll. This seems fairly well supported natively in echarts via datazoom.
dataZoom: [
  {
    show: true,
    realtime: true,
    start: 30,
    end: 70,
    xAxisIndex: [0, 1]
  },
  {
    type: 'inside',
    realtime: true,
    start: 30,
    end: 70,
    xAxisIndex: [0, 1]
  }
],
CCiufo-WMF moved this task from Backlog to Chart data integrations on the Charts board.