Commit Graph

37 Commits

Author SHA1 Message Date
Marshall Polaris
59cdc9f776
Update FR colors, consolidate non-top answers into "Other" (#1031)
* Update FR colors, consolidate non-top answers into "Other"

* Fix answer panel coloration to not be weird and work on Firefox
2022-10-11 23:59:11 -07:00
Pico2x
34d09316e0 Yscale now updates when zooming in on chart 2022-10-05 15:46:18 +01:00
Pico2x
07de8cc86a Slightly less horrible color palette 2022-10-05 15:01:41 +01:00
Pico2x
3390c34d0a Mobile tooltip isn't occluded by finger anymore 2022-10-05 14:19:26 +01:00
Pico2x
e4d7d0a232 Mobile graphs no longer show the zoom function. 2022-10-05 13:57:45 +01:00
ingawei
c115b5cca7
Inga/multiple colors (#994)
* making FR bars smoller
2022-10-04 17:36:03 -05:00
Marshall Polaris
d6bb27f97c
Fix graph area to invert at 0 (#998) 2022-10-04 14:13:53 -07:00
Marshall Polaris
bbce3e873e
Tooltip follows marker on charts with marker (#997)
* Renaming of some tooltip stuff

* Tooltip follows marker on single value history charts
2022-10-04 14:02:44 -07:00
ingawei
5adaa7253f
made slice skinnier (#996) 2022-10-04 15:41:48 -05:00
Marshall Polaris
a55d85d4b6
Implement basic graph tooltip slice marker thingy (#995) 2022-10-04 12:55:51 -07:00
Marshall Polaris
31c6cb7739
Rewrite portfolio graphs with new machinery (#986)
* Fix chart `onMouseOver` propagation

* Make generic charts support money on y-axis

* Fix somewhat ridiculous `formatMoney` to work with negative amounts

* Make margins on charts configurable

* Implement color as function of point on SingleValueHistoryChart

* Rewrite portfolio history graphs with new graph machinery

* Toast Nivo
2022-10-04 01:18:22 -07:00
Pico2x
77a5f8b9dd Revert the merge revert (double revert) 2022-10-03 17:31:07 +01:00
Pico2x
3fb43c16c4 Revert "Merge branch 'main' of https://github.com/manifoldmarkets/manifold"
This reverts commit 603201a00f, reversing
changes made to b517817ee3.
2022-10-03 10:02:38 +01:00
Marshall Polaris
503038d2a2 Fix a dumb bug on pseudo-numeric charts 2022-10-02 16:59:49 -07:00
Marshall Polaris
bf8dca25b2
Rewrite stats graphs using new machinery (#985)
* Make curve configurable on generic charts

* Extract SizedContainer helper component

* Use new charts for stats page

* Move analytics charts component

* Fix up start date logic for graphs excluding data
2022-10-02 16:56:29 -07:00
Marshall Polaris
2f1221f094
Size-aware chart tooltip positioning (#980) 2022-10-01 00:10:17 -07:00
Marshall Polaris
89e26d077e
Clean up chart sizing code (#977)
* Clean up chart sizing code

* Do all the chart sizing work in same batch
2022-09-30 16:57:48 -07:00
Marshall Polaris
38b7c898f6
More refactoring to make chart tooltips more flexible (#975) 2022-09-30 16:16:04 -07:00
Marshall Polaris
1bc1debbe8 Fix default sizes on charts to make more sense 2022-09-30 00:05:36 -07:00
Marshall Polaris
608ee7b865
Chart visual style adjustment (#971)
* Adjust area fill opacity on line charts

* Light gray border on tooltips
2022-09-30 00:03:31 -07:00
Marshall Polaris
7e91133229
Change styles on contract tooltips to be more like portfolio graph (#966) 2022-09-29 22:45:51 -07:00
Marshall Polaris
523689b525
Keep tooltip within bounds of chart (well, for non-FR charts) (#970) 2022-09-29 22:45:31 -07:00
Marshall Polaris
715bae57e0
Fix date memoization in charts (#972)
* Memoize on numbers, not dates

* Use numbers instead of dates to calculate visible range
2022-09-29 21:35:20 -07:00
Marshall Polaris
5b5a919ed7
Expose onMouseOver chart event to hook into from outside (#967) 2022-09-29 20:18:33 -07:00
Marshall Polaris
8929b2e6ba
Improve typing for chart tooltip stuff (#962) 2022-09-29 12:51:38 -07:00
Marshall Polaris
15cd8b1f94
Fix a couple small chart bugs (#960)
* Fix time clamping causing little visual glitch

* Fix tick formatting glitch
2022-09-28 23:27:42 -07:00
Marshall Polaris
8862425120
Clean up chart tooltip handling (#959) 2022-09-28 21:43:04 -07:00
Marshall Polaris
be010da9f5
Refactor chart tooltip stuff, add bet avatar to tooltips (#958)
* Use objects instead of tuples for chart data

* Carry bet data down into charts

* Refactor to invert control of chart tooltip display

* Jazz up the chart tooltips with avatars

* Tidying
2022-09-28 21:14:34 -07:00
Marshall Polaris
7f7e7acd61
Make binary and pseudonumeric charts re-render less on contract diff (#955) 2022-09-28 18:03:30 -07:00
Marshall Polaris
83de206e9e
Simply don't print zero (#954) 2022-09-28 14:20:28 -07:00
Marshall Polaris
89c3ea559c
Clamp time range in history chart scales (#952) 2022-09-28 01:18:11 -07:00
Marshall Polaris
9238b20242
Modularize d3 imports (#951) 2022-09-28 01:00:39 -07:00
Marshall Polaris
925a9e850f
Hack up brush rendering to fix possible Chrome bug (#950) 2022-09-28 00:58:51 -07:00
Marshall Polaris
8f88af4e2a
Fix an edge case with chart mouseover tooltips (#949) 2022-09-28 00:56:43 -07:00
Marshall Polaris
5b54e7d468
Limit max width of FR legend tooltip labels (#948) 2022-09-27 22:25:37 -07:00
Marshall Polaris
c16adb9ec9
Fix potential clock sync issues with graph updating (#947) 2022-09-27 21:18:22 -07:00
Marshall Polaris
e0d9b4d335
Rewrite contract graphs (#935)
* Fiddle around with everything, WIP FR charts

* Implement numeric chart

* Reorganize everything into neat little files

* Add `AreaWithTopStroke` helper

* Tidying, don't gratuitously use d3.format

* Remove duplicate code

* Better tooltip bisection

* `NumericPoint` -> `DistributionPoint`

* Add numeric market tooltip

* Make numeric chart bucket points less wrong

* Clean up numeric bucket computation

* Clean up a bunch of tooltip stuff, add FR legend tooltips

* Fix a dumb bug

* Implement basic time selection

* Fix fishy Date.now inconsistency bugs

* Might as well show all the FR outcomes now

* Make tooltips accurate on curveStepAfter charts

* Make log scale PN charts work properly

* Adjust x-axis tick count

* Display tooltip on charts only for mouse

* Fix up deps

* Tighter chart tooltips

* Adjustments to chart time range management

* Better date formatting

* Continue tweaking time selection handling to be perfect

* Make FR charts taller by default
2022-09-27 20:24:42 -07:00