[SOLVED] Request for ChartJS example

Answered
0
0

Howdy,

I’d like to request an chart example in vb.net, if possible.
I was unable to make it from the existing example for chartJS.

What i want to achieve is, I want some graphic where i can set a value, for example 95000 as maximum, and define the current, like 65400

For example, it’s a email account quota, to have a visual one the quota max and current quota.

Thanks in advanced,

  • You must to post comments
Best Answer
0
0

With the way the ChartJS implementation works, you’ll need to add a little bit of logic, for example:

Private Function FillDataSet(current As Integer, max As Integer) As Object()

        Dim maxLeftOver As Integer = max - current

        Return New Object() {current, maxLeftOver}

    End Function

You can play around with it to get your desired functionality.

Use it like:

pieDataSet1.Data = FillDataSet(1,5)

You should also check out the “JustGage” component, this might be more suited for what you want to accomplish!  You can integrate any third-party JavaScript library you like to fill the chart if either of these don’t work.

Let me know if this works!

  • Jorge Bastos
    JustGage is perfect Levie! Anyway you have me an help on how to understand chart. Thanks for your help,
  • You must to post comments
0
0

Thanks  Levie,

Almost it 😉

how to give the chart the value of 100, and make it fill for example 74 ?

  • You must to post comments
0
0

Hi Jorge,

Please let me know if this sample works for you!

Best,

Levie

Attachment
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.