<commit_before>module Line where

import Chartjs.Bar exposing (..)
import Color exposing (..)
import Signal exposing (..)
import Html exposing (..)
import Html.Events as E

data : Config
data =
  ( ["January", "February", "March", "April", "May", "June", "July"]
  , [ ( "My First dataset"
      , defStyle (rgba 220 220 220)
      , [65, 59, 80, 81, 56, 55, 40] )
    , ( "My Second dataset"
      , defStyle (rgba 151 187 205)
      , [28, 48, 40, 19, 86, 27, 90] ) ] )

data' : Config
data' =
  ( ["January", "February", "March", "April", "May", "June", "July"]
  , [ ( "My First dataset"
      , defStyle (rgba 220 220 220)
      , [65, 59, 80, 81, 0, 55, 40] )
    , ( "My Second dataset"
      , defStyle (rgba 151 187 205)
      , [28, 48, 40, 0, 86, 27, 0] ) ] )

mail : Mailbox Bool
mail = let
  m = mailbox False
  in { m | signal <-
    foldp (always not) False m.signal }

view : Bool -> Html
view isClicked = div []
  [ fromElement <| chart 700 300 (if isClicked then data' else data) defaultOptions
  , button [E.onClick mail.address True] [text "toggle"] ]

main : Signal Html
main = view <~ mail.signal
<commit_msg>Bar looks good<commit_after>module Bar where

import Chartjs.Bar exposing (..)
import Color exposing (..)
import Signal exposing (..)
import Html exposing (..)
import Html.Events as E

data : Config
data =
  ( ["January", "February", "March", "April", "May", "June", "July"]
  , [ ( "My First dataset"
      , defStyle (rgba 220 220 220)
      , [65, 59, 80, 81, 56, 55, 40] )
    , ( "My Second dataset"
      , defStyle (rgba 151 187 205)
      , [28, 48, 40, 19, 86, 27, 90] ) ] )

data' : Config
data' =
  ( ["January", "February", "March", "April", "May", "June", "July"]
  , [ ( "My First dataset"
      , defStyle (rgba 220 220 220)
      , [65, 59, 80, 81, 0, 55, 40] )
    , ( "My Second dataset"
      , defStyle (rgba 151 187 205)
      , [28, 48, 40, 0, 86, 27, 0] ) ] )

mail : Mailbox Bool
mail = let
  m = mailbox False
  in { m | signal <-
    foldp (always not) False m.signal }

view : Bool -> Html
view isClicked = div []
  [ fromElement <| Chartjs.Bar.chart 700 300 (if isClicked then data' else data) defaultOptions
  , button [E.onClick mail.address True] [text "toggle"] ]

main : Signal Html
main = view <~ mail.signal

{'fraction_non_alphanumeric': 0.16358839050131926, 'fraction_numerical': 0.08355321020228672, 'mean_word_length': 2.8107202680067003, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4962904', 'n_tokens_mistral': 1034, 'n_tokens_neox': 805, 'n_words': 290}