Genie Discord forum

Author Avatarkungfupanda007
1/18/2023, 9:25:57 AM

@out xp = PlotData() @handlers begin @onchangeany isready begin xp = PlotData( x="Sales", "Consulting", "Net revenue", "Purchases", "Other expenses", "Profit before tax", y=60, 80, 0, -40, -20, 0, plot=StipplePlotly.Charts.PLOT_TYPE_BAR, )

end end

getting error msg : syntax: invalid keyword argument name "model.plot".

Please Support !!!

Author Avatarabhimanyuaryan
1/18/2023, 2:04:31 PM

need more if what are you using Stipple/GenieFramework/GenieBuilder?

if you are using GenieFramework.jl you can take this example of barplot: https://github.com/GenieFramework/GenieFramework.jl#basic-application

Author Avatarkrishnab
1/18/2023, 3:30:52 PM

I think instead of PlotData() on the first line you might try PlotData . Perhaps that might work.

Author Avatarkungfupanda007
1/19/2023, 5:39:36 PM

Help me buddy!!! After using PlotData code is not breaking but it is not showing any plot data

Author Avatarkungfupanda007
1/19/2023, 5:40:33 PM

Why have we used qusar, it is not at friendly. Please make a way to use either tailwind or bootstrap which is acceptable by 90% of people

Author Avatarkrishnab
1/19/2023, 6:40:57 PM

So if you look in the tutorial https://www.genieframework.com/blog/how-to-quickly-turn-your-julia-code-into-a-web-app-with-genie-builder/ . this, is what I saw. as an example for plots, and it works for me.

@handlers begin
     ...
     @out age_slots = ["20-30", "30-40", "40-50", "50-60", "60-70", "70-80", "80-90"]
     @out credit_no_by_age_plot = PlotData[]
     @out credit_no_by_age_plot_layout = PlotLayout(barmode="group", showlegend = true)
     @onchange age_range begin
         ...
         credit_no_by_age_plot = [
             PlotData(
                 x = age_slots, 
                 y = collect(values(credit_no_by_age(filtered_data; good_rating = true))),
                 name = "Good credits", 
                 plot = StipplePlotly.Charts.PLOT_TYPE_BAR, 
                 marker = PlotDataMarker(color = "#72C8A9")
             ),
             PlotData(
                 x = age_slots, 
                 y = collect(values(credit_no_by_age(filtered_data; good_rating = false))),
                 name = "Bad credits", 
                 plot = StipplePlotly.Charts.PLOT_TYPE_BAR, 
                 marker = PlotDataMarker(color = "#BD5631")
             )
         ]
     end
 end

So the first @out credit_no_by_age_plot = PlotData[] uses square brackets. But then in the onchange macro ,you have to pass an array of plots, not just a single plot. So like [PlotData()]. You can give that a try, but that is consistent with the example. I am not sure if you need any additional stylings in the plots statement for bar plots.

Author Avatarkungfupanda007
1/19/2023, 6:41:56 PM

Why there is difference is geniebuilder and stipple ??? How one can make a good product?

Author Avatarkungfupanda007
1/19/2023, 6:42:43 PM

I have tried this to make plot type as pie but still no chart is loading

Author Avatarkungfupanda007
1/19/2023, 6:43:06 PM

Not everyone wanna make a scatter chart

Author Avatarkrishnab
1/19/2023, 7:14:18 PM

I think you can do the same no matter what chart you make. The plot api follows plotly, so you can lookup the details there.

Author Avatarkrishnab
1/19/2023, 7:15:22 PM

Haha I am totally new to genie, so I just follow the tutorials to the best of my ability :).

Author Avatarkungfupanda007
1/19/2023, 7:16:21 PM

Buddy this can make just a single dashboard that too without any authentication, how to make a mature product with this?

Author Avatarabhimanyuaryan
1/20/2023, 3:38:39 AM

@kungfupanda007 not sure why it doesn't work. Can you provide some error stack? Using bar plot

Author Avatarkungfupanda007
1/20/2023, 4:04:25 AM

Sure @abhimanyuaryan i will run the same code piece and will share the result in couple of minutes

Author Avatarkungfupanda007
1/20/2023, 4:24:29 AM

@abhimanyuaryan individually, this code is working fine. But when I use same in project here the error:

Author Avatarkungfupanda007
1/20/2023, 4:24:30 AM

MethodError: no method matching iterate(::StipplePlotly.Charts.PlotData) Closest candidates are: iterate(::Union{LinRange, StepRangeLen}) at range.jl:872 iterate(::Union{LinRange, StepRangeLen}, ::Integer) at range.jl:872 iterate(::T) where T<:Union{Base.KeySet{<:Any, <:Dict}, Base.ValueIterator{<:Dict}} at dict.jl:712 ... Stacktrace: 1 indexed_iterate(I::StipplePlotly.Charts.PlotData, i::Int64) @ Base ./tuple.jl:91

Author Avatarkungfupanda007
1/20/2023, 7:20:49 AM

Hi team, It worked. I just created a new environment and fresh installation. Thanks for help. Definitely few items are having issue of ver conflict