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

Upgrade elm-plot to 0.19.1? #120

Open
vistuleB opened this issue Sep 8, 2022 · 2 comments
Open

Upgrade elm-plot to 0.19.1? #120

vistuleB opened this issue Sep 8, 2022 · 2 comments

Comments

@vistuleB
Copy link

vistuleB commented Sep 8, 2022

The old Elm-plot looks more intuitive/human to me, and Chart.Attributes.amount is not working for me.

Is there any way we could get an upgrade to 0.19.1?

@vistuleB
Copy link
Author

vistuleB commented Sep 12, 2022

Here's an MWE of the issue I encountered with Chart.Attributes.amount; I wanted the axes/grid ticks to appear 0, 6, 12, 18, 24 but they keep on appearing at 0, 5, 10, 15, 20:

module Main exposing (..)

import Browser
import Chart as C
import Chart.Attributes as CA
import Html exposing (Html, div)
import Html.Attributes exposing (style)


type alias Model =
    {}


type Msg
    = Msg


main : Program () Model Msg
main =
    Browser.element
        { init = init
        , update = update
        , subscriptions = \_ -> Sub.none
        , view = view
        }


init : () -> ( Model, Cmd Msg )
init _ =
    ( {}, Cmd.none )


update : Msg -> Model -> ( Model, Cmd Msg )
update _ model =
    ( model, Cmd.none )


view : Model -> Html Msg
view _ =
    let
        data =
            [ { x = 0, y = 0 }
            , { x = 24, y = 10 }
            ]
    in
    div
        [ style "width" "300px"
        , style "height" "300px"
        , style "padding" "50px"
        ]
        [ C.chart
            [ CA.height 300
            , CA.width 300
            ]
            [ C.xLabels
                [ CA.withGrid
                , CA.amount 5
                ]
            , C.yLabels
                [ CA.withGrid ]
            , C.series .x [ C.scatter .y [] ] data
            ]
        ]

@vistuleB vistuleB changed the title Elm-plot upgrade to 0.19.1? puuu-leeeze? Upgrade elm-plot to 0.19.1? Sep 15, 2022
@vistuleB
Copy link
Author

I'm going to start a separate issue for the MWE above, for visibility / clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant