Giter VIP home page Giter VIP logo

vizor-echarts's People

Contributors

bmotmans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vizor-echarts's Issues

Sanitize the documentation

The documentation is imported from the official docs using a script, not everything might be .NET relevant

Implement chart data loaders

In real life, we might want to bind filters to charts, for example: to select the date range, select an interval, specify other filters, ... .
Data also tends to come from a database.
So we need a way to retrieve data in a very generic way, allowing the implementer full flexibility.

Proposed API:

// when using multiple data loaders
[Parameter]
public List<Task>? DataLoaders { get; set; }

// when only using 1 data loader
// if both DataLoader+DataLoaders are specified, DataLoader is executed first
[Parameter]
public Task? DataLoader { get; set; }

The task would be responsible to modify the ChartOptions in C#. After all data loaders are executed, the serialized ChartOptions are sent to JS.

Getting access to the selected item

Hello,

Very impressed so far with the library so far. I am trying to get off Syncfusion from a speed and cost perspective and Echarts is great and given my experience with Javascript having a wrapper library is perfect for me.

One of my use cases, requires me to update a separate chart when a segment of a pie chart is selected. I've got the selection part working but I cannot seem to find how to either capture the selection event or access a list of selected items.

My pie series configuration is :

options.Series = new()
{ 
    new PieSeries()
    {
        Name = SeriesName,
        Radius = IsDoughtnut ? new CircleRadius("40%", "70%") : new CircleRadius("50%"),
        AvoidLabelOverlap = true,
        StillShowZeroSum = false,
        ShowEmptyCircle = false,
        SelectedMode = AllowSingleSelection ? Vizor.ECharts.SelectionMode.Single : null,
        SelectedOffset = 20, 
        Data = Data,
        Label = new()
        {
             Show = true, 
             Overflow = Overflow.Truncate,
             Precision = 2,
             Formatter = "{b}: {d}%"
        },
        LabelLine = new()
        {
            Show = true,
        },
        ItemStyle = new()
            {
                BorderRadius = 10,
                BorderColor = "#fff",
                BorderWidth= 2
            },
        Emphasis = new()
        {
            ItemStyle = new()
            {
                ShadowBlur = 10,
                ShadowOffsetX = 0,

                ShadowColor = Vizor.ECharts.Color.FromRGBA(0, 0, 0, 0.5)
            }
        }
    }
}; 

If anyone has any ideas it would be great to hear from you.

Can't install package for Blazor Webassembly

Hey!

i found your library and run the demo project and it all works ok but
I am getting an issue when trying to install the package with Nuget under Visual Studio.
Trying to instal Vizor.ECharts v 0.9.0
and getting this error:
Error NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'. Rentoom.Client c:\program files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets 491

the project file is updated with reference only.

image

Implement DotNet callback functions

[JSInvokable("FormatLabel")]
private string FormatLabel(dynamic item)
{
	return $"{item.Name} ({item.percent * 2}%)";
}

Challenges:

  • A lot of variations to support: instance <> static, Task<T> vs T vs dynamic return type
  • There are functions with multiple parameters: we need a way to detect this dynamically

How to disable a series by default?

I want to set a series disabled by default, so that the user has to clicked on the legend entry to show its data in the chart. I don't found a option for. I think, the _echart.Options.Legend.Selected property is for that, but the class Selected() seems to have no parameters nor methods to work with. Is there a working approach to set a series disabeld by default?

Size to fit container: Width="auto" not working

Hello all,

When I use Width="auto" to fit the chart width to it's parent, it's not working:
<Vizor.ECharts.EChart Options="@options" Width="auto" Height="400px" />

Do you know if there is some workaround or if I'm not using it correctly ?

JS processObject improvements

optimize the processObject function to not use recursive await's

instead: first list all replacements to be done and await what is needed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.