Mailing List Archive

Ntopng chart time axis formatting problems
Charts are displayed in several places in ntopng's web interface. I find these difficult to interpret beyond a one day date range because of several problems:
- It doesn't display the dates on the time axis.
- The times are relative to the current time, so they aren't whole hours.
- The chart appears to always be divided into the same number of segments, so the interval between segments isn't a whole number of hours.
- A cosmetic issue, but if I scale the display (in Firefox), at some scales some of the divisions disappear.

E.g I'm looking at a 1 week chart now, and the values on the axis are 11:19:00, 21:13:20, 11:06:40, etc. It makes it hard to even tell where each day begins.

Looking at the webpage source, I found this function:
function getTickFormat(diff_epoch) {
var tickFormat;

if(diff_epoch < 86400) {
tickFormat = "%H:%M:%S";
} else if(diff_epoch < 2*86400) {
tickFormat = "%b %e, %H:%M:%S";
} else {
tickFormat = "%b %e";
}

return(tickFormat);
}

That looks to me like it's supposed to display the date and time if the range is over a day, and just the date if it's over 2 days. But the only use of that function in the page source is:
var tickFormat = getTickFormat(0);

Is this variable scale format a feature that was never fully implemented?

Peter Shute
_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Ntopng chart time axis formatting problems [ In reply to ]
Peter
in the pro version we use a different library where the problem you
reported doesn't appear

If you have a patch to share, please send us a pull request and we'll
consider its inclusion in ntopng

Regards Luca

On 11/15/2016 01:33 AM, Peter Shute wrote:
> Charts are displayed in several places in ntopng's web interface. I find these difficult to interpret beyond a one day date range because of several problems:
> - It doesn't display the dates on the time axis.
> - The times are relative to the current time, so they aren't whole hours.
> - The chart appears to always be divided into the same number of segments, so the interval between segments isn't a whole number of hours.
> - A cosmetic issue, but if I scale the display (in Firefox), at some scales some of the divisions disappear.
>
> E.g I'm looking at a 1 week chart now, and the values on the axis are 11:19:00, 21:13:20, 11:06:40, etc. It makes it hard to even tell where each day begins.
>
> Looking at the webpage source, I found this function:
> function getTickFormat(diff_epoch) {
> var tickFormat;
>
> if(diff_epoch < 86400) {
> tickFormat = "%H:%M:%S";
> } else if(diff_epoch < 2*86400) {
> tickFormat = "%b %e, %H:%M:%S";
> } else {
> tickFormat = "%b %e";
> }
>
> return(tickFormat);
> }
>
> That looks to me like it's supposed to display the date and time if the range is over a day, and just the date if it's over 2 days. But the only use of that function in the page source is:
> var tickFormat = getTickFormat(0);
>
> Is this variable scale format a feature that was never fully implemented?
>
> Peter Shute
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc


_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Ntopng chart time axis formatting problems [ In reply to ]
I'm using Pro Small Business Edition. Is that different to the Pro version you're referring to?

Peter Shute

Sent from my iPad

> On 15 Nov. 2016, at 6:55 pm, Luca Deri <deri@ntop.org> wrote:
>
> Peter
> in the pro version we use a different library where the problem you
> reported doesn't appear
>
> If you have a patch to share, please send us a pull request and we'll
> consider its inclusion in ntopng
>
> Regards Luca
>
>> On 11/15/2016 01:33 AM, Peter Shute wrote:
>> Charts are displayed in several places in ntopng's web interface. I find these difficult to interpret beyond a one day date range because of several problems:
>> - It doesn't display the dates on the time axis.
>> - The times are relative to the current time, so they aren't whole hours.
>> - The chart appears to always be divided into the same number of segments, so the interval between segments isn't a whole number of hours.
>> - A cosmetic issue, but if I scale the display (in Firefox), at some scales some of the divisions disappear.
>>
>> E.g I'm looking at a 1 week chart now, and the values on the axis are 11:19:00, 21:13:20, 11:06:40, etc. It makes it hard to even tell where each day begins.
>>
>> Looking at the webpage source, I found this function:
>> function getTickFormat(diff_epoch) {
>> var tickFormat;
>>
>> if(diff_epoch < 86400) {
>> tickFormat = "%H:%M:%S";
>> } else if(diff_epoch < 2*86400) {
>> tickFormat = "%b %e, %H:%M:%S";
>> } else {
>> tickFormat = "%b %e";
>> }
>>
>> return(tickFormat);
>> }
>>
>> That looks to me like it's supposed to display the date and time if the range is over a day, and just the date if it's over 2 days. But the only use of that function in the page source is:
>> var tickFormat = getTickFormat(0);
>>
>> Is this variable scale format a feature that was never fully implemented?
>>
>> Peter Shute
>> _______________________________________________
>> Ntop-misc mailing list
>> Ntop-misc@listgateway.unipi.it
>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Ntopng chart time axis formatting problems [ In reply to ]
No it should be the same (I assumed that you were using the community
edition)

please file a bug on github and assign it to Emanuele who is taking care
of these issues

luca

On 11/15/2016 10:19 AM, Peter Shute wrote:
> I'm using Pro Small Business Edition. Is that different to the Pro version you're referring to?
>
> Peter Shute
>
> Sent from my iPad
>
>> On 15 Nov. 2016, at 6:55 pm, Luca Deri <deri@ntop.org> wrote:
>>
>> Peter
>> in the pro version we use a different library where the problem you
>> reported doesn't appear
>>
>> If you have a patch to share, please send us a pull request and we'll
>> consider its inclusion in ntopng
>>
>> Regards Luca
>>
>>> On 11/15/2016 01:33 AM, Peter Shute wrote:
>>> Charts are displayed in several places in ntopng's web interface. I find these difficult to interpret beyond a one day date range because of several problems:
>>> - It doesn't display the dates on the time axis.
>>> - The times are relative to the current time, so they aren't whole hours.
>>> - The chart appears to always be divided into the same number of segments, so the interval between segments isn't a whole number of hours.
>>> - A cosmetic issue, but if I scale the display (in Firefox), at some scales some of the divisions disappear.
>>>
>>> E.g I'm looking at a 1 week chart now, and the values on the axis are 11:19:00, 21:13:20, 11:06:40, etc. It makes it hard to even tell where each day begins.
>>>
>>> Looking at the webpage source, I found this function:
>>> function getTickFormat(diff_epoch) {
>>> var tickFormat;
>>>
>>> if(diff_epoch < 86400) {
>>> tickFormat = "%H:%M:%S";
>>> } else if(diff_epoch < 2*86400) {
>>> tickFormat = "%b %e, %H:%M:%S";
>>> } else {
>>> tickFormat = "%b %e";
>>> }
>>>
>>> return(tickFormat);
>>> }
>>>
>>> That looks to me like it's supposed to display the date and time if the range is over a day, and just the date if it's over 2 days. But the only use of that function in the page source is:
>>> var tickFormat = getTickFormat(0);
>>>
>>> Is this variable scale format a feature that was never fully implemented?
>>>
>>> Peter Shute
>>> _______________________________________________
>>> Ntop-misc mailing list
>>> Ntop-misc@listgateway.unipi.it
>>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>>
>> _______________________________________________
>> Ntop-misc mailing list
>> Ntop-misc@listgateway.unipi.it
>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc


_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Ntopng chart time axis formatting problems [ In reply to ]
I submitted the bug soon after posting here, and it was reported fixed last week. I updated ntopng this morning and the time axis now displays dates for ranges longer than 2 days.

Thanks for fixing it.

Peter Shute

Sent from my iPad

> On 15 Nov. 2016, at 8:24 pm, Luca Deri <deri@ntop.org> wrote:
>
> No it should be the same (I assumed that you were using the community
> edition)
>
> please file a bug on github and assign it to Emanuele who is taking care
> of these issues
>
> luca
>
>> On 11/15/2016 10:19 AM, Peter Shute wrote:
>> I'm using Pro Small Business Edition. Is that different to the Pro version you're referring to?
>>
>> Peter Shute
>>
>> Sent from my iPad
>>
>>> On 15 Nov. 2016, at 6:55 pm, Luca Deri <deri@ntop.org> wrote:
>>>
>>> Peter
>>> in the pro version we use a different library where the problem you
>>> reported doesn't appear
>>>
>>> If you have a patch to share, please send us a pull request and we'll
>>> consider its inclusion in ntopng
>>>
>>> Regards Luca
>>>
>>>> On 11/15/2016 01:33 AM, Peter Shute wrote:
>>>> Charts are displayed in several places in ntopng's web interface. I find these difficult to interpret beyond a one day date range because of several problems:
>>>> - It doesn't display the dates on the time axis.
>>>> - The times are relative to the current time, so they aren't whole hours.
>>>> - The chart appears to always be divided into the same number of segments, so the interval between segments isn't a whole number of hours.
>>>> - A cosmetic issue, but if I scale the display (in Firefox), at some scales some of the divisions disappear.
>>>>
>>>> E.g I'm looking at a 1 week chart now, and the values on the axis are 11:19:00, 21:13:20, 11:06:40, etc. It makes it hard to even tell where each day begins.
>>>>
>>>> Looking at the webpage source, I found this function:
>>>> function getTickFormat(diff_epoch) {
>>>> var tickFormat;
>>>>
>>>> if(diff_epoch < 86400) {
>>>> tickFormat = "%H:%M:%S";
>>>> } else if(diff_epoch < 2*86400) {
>>>> tickFormat = "%b %e, %H:%M:%S";
>>>> } else {
>>>> tickFormat = "%b %e";
>>>> }
>>>>
>>>> return(tickFormat);
>>>> }
>>>>
>>>> That looks to me like it's supposed to display the date and time if the range is over a day, and just the date if it's over 2 days. But the only use of that function in the page source is:
>>>> var tickFormat = getTickFormat(0);
>>>>
>>>> Is this variable scale format a feature that was never fully implemented?
>>>>
>>>> Peter Shute
>>>> _______________________________________________
>>>> Ntop-misc mailing list
>>>> Ntop-misc@listgateway.unipi.it
>>>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>>>
>>> _______________________________________________
>>> Ntop-misc mailing list
>>> Ntop-misc@listgateway.unipi.it
>>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>> _______________________________________________
>> Ntop-misc mailing list
>> Ntop-misc@listgateway.unipi.it
>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc