Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to display forecast history #28

Closed
NunoSempere opened this issue Mar 28, 2022 · 3 comments
Closed

Figure out how to display forecast history #28

NunoSempere opened this issue Mar 28, 2022 · 3 comments
Labels
feature A new feature

Comments

@NunoSempere
Copy link
Collaborator

Right now, we are saving forecasts' history, but we are not doing much with it. It would be nice to display forecast evolution. But then we'd have to figure out how to display it (e.g., in forecast-specific pages? in the normal view?), which might be a bit tricky. If we have forecast-specific pages, we might also want to do some other stuff with it...

@NunoSempere
Copy link
Collaborator Author

The manifold market guys shared their binary forecast charts code:

  return (
    <div
      className="w-full overflow-hidden"
      style={{ height: height ?? (!width || width >= 800 ? 400 : 250) }}
    >
      <ResponsiveLine
        data={data}
        yScale={{ min: 0, max: 100, type: 'linear' }}
        yFormat={formatPercent}
        gridYValues={yTickValues}
        axisLeft={{
          tickValues: yTickValues,
          format: formatPercent,
        }}
        xScale={{
          type: 'time',
          min: startDate,
          max: latestTime.toDate(),
        }}
        xFormat={(d) => formatTime(+d.valueOf(), lessThanAWeek)}
        axisBottom={{
          tickValues: numXTickValues,
          format: (time) => formatTime(+time, lessThanAWeek),
        }}
        colors={{ datum: 'color' }}
        pointSize={bets.length > 100 ? 0 : 10}
        pointBorderWidth={1}
        pointBorderColor="#fff"
        enableSlices="x"
        enableGridX={!!width && width >= 800}
        enableArea
        margin={{ top: 20, right: 28, bottom: 22, left: 40 }}
      />
    </div>
  )

They also pointed to https://nivo.rocks/ as their library for charts.

Maybe @Hazelfire would be interested in this?

@Hazelfire
Copy link

Looks interesting! I currently have priorities with Squiggle so I don't think I'd be coming to this soon

@berekuk
Copy link
Collaborator

berekuk commented May 9, 2022

Done with #74

@berekuk berekuk closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

No branches or pull requests

3 participants